@memorysmithapp/markdown-renderer 0.10.0 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/theme-default.css +15 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memorysmithapp/markdown-renderer",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "A React component that draws a MemorySmith note exactly as MemorySmith's reading page does.",
5
5
  "keywords": [
6
6
  "markdown",
@@ -80,7 +80,7 @@
80
80
  "unified": "11.0.5"
81
81
  },
82
82
  "devDependencies": {
83
- "@memorysmithapp/markdown-spec": "0.10.0",
83
+ "@memorysmithapp/markdown-spec": "0.10.2",
84
84
  "@types/hast": "3.0.5",
85
85
  "@types/react": "19.2.18",
86
86
  "@types/react-dom": "19.2.4",
package/theme-default.css CHANGED
@@ -283,9 +283,6 @@
283
283
  .markdown li[class~='task-list-item'] {
284
284
  list-style: none;
285
285
  }
286
- .markdown ul[class~='contains-task-list'] {
287
- padding-inline-start: 0.4em;
288
- }
289
286
  .markdown input[type='checkbox'] {
290
287
  margin-inline-end: 0.45em;
291
288
  accent-color: var(--ms-accent);
@@ -1186,13 +1183,19 @@
1186
1183
  line-height: 1.5;
1187
1184
  }
1188
1185
 
1189
- /* A task box that can be ticked. Disabled is the default. */
1186
+ /* A task box that can be ticked. Disabled is the default. A list with tasks
1187
+ keeps the indent of any list, and the box hangs in it where a plain item's
1188
+ marker does, so every item of the list starts its text in one column and
1189
+ nothing is drawn outside the note (#142, #144). The box is taken out of the
1190
+ flow, its end half a rem before the text, whatever its width. */
1190
1191
  .markdown li.task-item {
1191
1192
  list-style: none;
1192
- margin-left: -1.2rem;
1193
+ position: relative;
1193
1194
  }
1194
- .markdown li.task-item input[type='checkbox'] {
1195
- margin-right: 0.5rem;
1195
+ .markdown li.task-item > input[type='checkbox'] {
1196
+ position: absolute;
1197
+ inset-inline-end: 100%;
1198
+ margin-inline: 0 0.5rem;
1196
1199
  accent-color: var(--ms-accent);
1197
1200
  }
1198
1201
  .markdown li.task-item input[type='checkbox']:not(:disabled) {
@@ -1200,7 +1203,11 @@
1200
1203
  }
1201
1204
 
1202
1205
  /* The lock over an item whose tick is being saved: the item dimmed under a
1203
- sweep of the accent, and "Updating…" in a pill at its right, breathing. */
1206
+ sweep of the accent, and "Updating…" in a pill at its right, breathing. It
1207
+ reaches back over the indent, where the item's box hangs. */
1208
+ .markdown li.task-item > .task-lock {
1209
+ inset-inline-start: calc(-1 * var(--ms-list-indent));
1210
+ }
1204
1211
  .markdown .task-lock {
1205
1212
  border-radius: 4px;
1206
1213
  background-color: color-mix(in srgb, var(--ms-bg) 55%, transparent);