@mirrordown/remd-tabs 0.2.0 → 0.2.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.
- package/CHANGELOG.md +16 -0
- package/dist/tabs.css +59 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## 0.2.2
|
|
10
|
+
<sub>2026-10-28</sub>
|
|
11
|
+
|
|
12
|
+
- *(patch)*
|
|
13
|
+
A tab strip too long for its group now scrolls with a thin scrollbar and fades at each edge that has more labels to scroll to (where scroll-driven animations are supported: Chrome 115+, Safari 26+). A strip that fits doesn't fade.
|
|
14
|
+
|
|
15
|
+
## 0.2.1
|
|
16
|
+
<sub>2026-10-28</sub>
|
|
17
|
+
|
|
18
|
+
- *(patch)*
|
|
19
|
+
Tab and step headers are placed by their `>` markers in remark and Sätteri, as markdown-it reads them. A header right after a paragraph, at its level, interrupts it and starts a group. A header written with a panel's or step body's own `>` is that panel's content: `% Tab` or `@1. Step` there starts a group inside it, and a nested header (`%%`, `@@`) with nothing to nest in stays text. Before, both became the next tab or step of the outer group.
|
|
20
|
+
- *(patch)*
|
|
21
|
+
A line written without a tab panel's or step body's `>` right after the last panel now starts a paragraph after the group in remark and Sätteri, as markdown-it reads it, instead of continuing the panel's last paragraph (CommonMark's lazy continuation). The lines after it, and attributes ending them, go with it.
|
|
22
|
+
|
|
7
23
|
## 0.2.0
|
|
8
24
|
<sub>2026-10-28</sub>
|
|
9
25
|
|
package/dist/tabs.css
CHANGED
|
@@ -19,6 +19,19 @@
|
|
|
19
19
|
allows arbitrary tab counts with a single rule pair, replacing the N×2 block.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
/* The label strip's edge fades, animated by its scroll position (registered so they animate). */
|
|
23
|
+
@property --_tabs-fade-start {
|
|
24
|
+
syntax: "<length>";
|
|
25
|
+
inherits: false;
|
|
26
|
+
initial-value: 0px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@property --_tabs-fade-end {
|
|
30
|
+
syntax: "<length>";
|
|
31
|
+
inherits: false;
|
|
32
|
+
initial-value: 0px;
|
|
33
|
+
}
|
|
34
|
+
|
|
22
35
|
@layer markdown-tabs {
|
|
23
36
|
/* ── Container ──────────────────────────────────────────────────────────── */
|
|
24
37
|
|
|
@@ -59,10 +72,56 @@
|
|
|
59
72
|
display: flex;
|
|
60
73
|
overflow-x: auto;
|
|
61
74
|
overflow-y: hidden;
|
|
75
|
+
scrollbar-width: thin;
|
|
76
|
+
scrollbar-color: color-mix(in oklch, currentColor 25%, transparent)
|
|
77
|
+
transparent;
|
|
62
78
|
background-color: var(--_tabs-strip-bg);
|
|
63
79
|
box-shadow: inset 0 -1px var(--_tabs-border);
|
|
64
80
|
}
|
|
65
81
|
|
|
82
|
+
/*
|
|
83
|
+
A strip too long for its group fades at each edge that has more labels to
|
|
84
|
+
scroll to: the scroll position drives the fades, and a strip that fits has
|
|
85
|
+
no scroll timeline, so it doesn't fade. Requires scroll-driven animations
|
|
86
|
+
(Chrome 115+, Safari 26+); elsewhere the strip scrolls without the fade.
|
|
87
|
+
*/
|
|
88
|
+
@keyframes markdown-tabs-edges {
|
|
89
|
+
from {
|
|
90
|
+
--_tabs-fade-start: 0px;
|
|
91
|
+
--_tabs-fade-end: 2rem;
|
|
92
|
+
}
|
|
93
|
+
10%,
|
|
94
|
+
90% {
|
|
95
|
+
--_tabs-fade-start: 2rem;
|
|
96
|
+
--_tabs-fade-end: 2rem;
|
|
97
|
+
}
|
|
98
|
+
to {
|
|
99
|
+
--_tabs-fade-start: 2rem;
|
|
100
|
+
--_tabs-fade-end: 0px;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@supports (animation-timeline: scroll()) {
|
|
105
|
+
.markdown-tabs-labels {
|
|
106
|
+
--_tabs-fade-direction: to right;
|
|
107
|
+
/* Longhands: minifiers fold `animation` and `animation-timeline` into one shorthand, which browsers reject. */
|
|
108
|
+
animation-name: markdown-tabs-edges;
|
|
109
|
+
animation-timing-function: linear;
|
|
110
|
+
animation-timeline: scroll(self inline);
|
|
111
|
+
mask-image: linear-gradient(
|
|
112
|
+
var(--_tabs-fade-direction),
|
|
113
|
+
transparent,
|
|
114
|
+
#000 var(--_tabs-fade-start),
|
|
115
|
+
#000 calc(100% - var(--_tabs-fade-end)),
|
|
116
|
+
transparent
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
&:dir(rtl) {
|
|
120
|
+
--_tabs-fade-direction: to left;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
66
125
|
/* Hide radio inputs without removing them from the DOM (needed for :has()) */
|
|
67
126
|
.markdown-tabs-labels input[type="radio"] {
|
|
68
127
|
position: fixed;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirrordown/remd-tabs",
|
|
3
3
|
"description": "A remark plugin for tabbed content blocks.",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Drake Costa <drake@saeris.io> (https://saeris.gg)",
|
|
7
7
|
"repository": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"./*.css": "./dist/*.css"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@mirrordown/core": "^0.1.
|
|
25
|
+
"@mirrordown/core": "^0.1.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/hast": "^3.0.4",
|