@mirrordown/remd-tabs 0.2.1 → 0.2.3
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 +14 -0
- package/dist/tabs.css +62 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 0.2.3
|
|
11
|
+
<sub>2026-11-03</sub>
|
|
12
|
+
|
|
13
|
+
- *(patch)*
|
|
14
|
+
Clip tabs to their rounded corners with `overflow: clip` rather than `hidden`, so they're no longer a scroll container: sticky content in a panel, such as a file tree's folder rows, now sticks to the page. `display: flow-root` keeps floats in a panel contained, as before.
|
|
15
|
+
|
|
16
|
+
## 0.2.2
|
|
17
|
+
<sub>2026-10-28</sub>
|
|
18
|
+
|
|
19
|
+
- *(patch)*
|
|
20
|
+
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.
|
|
21
|
+
|
|
8
22
|
## 0.2.1
|
|
9
23
|
<sub>2026-10-28</sub>
|
|
10
24
|
|
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
|
|
|
@@ -49,7 +62,9 @@
|
|
|
49
62
|
border: 1px solid var(--_tabs-border);
|
|
50
63
|
border-radius: var(--_tabs-radius);
|
|
51
64
|
background: var(--_tabs-bg);
|
|
52
|
-
overflow: hidden
|
|
65
|
+
/* Clipped to the rounded corners rather than hidden, which would make it a scroll container: sticky content inside, such as a file tree's folder rows, would stick to it instead of the page. flow-root keeps the floats inside that overflow: hidden contained. */
|
|
66
|
+
display: flow-root;
|
|
67
|
+
overflow: clip;
|
|
53
68
|
}
|
|
54
69
|
|
|
55
70
|
/* ── Label strip ────────────────────────────────────────────────────────── */
|
|
@@ -59,10 +74,56 @@
|
|
|
59
74
|
display: flex;
|
|
60
75
|
overflow-x: auto;
|
|
61
76
|
overflow-y: hidden;
|
|
77
|
+
scrollbar-width: thin;
|
|
78
|
+
scrollbar-color: color-mix(in oklch, currentColor 25%, transparent)
|
|
79
|
+
transparent;
|
|
62
80
|
background-color: var(--_tabs-strip-bg);
|
|
63
81
|
box-shadow: inset 0 -1px var(--_tabs-border);
|
|
64
82
|
}
|
|
65
83
|
|
|
84
|
+
/*
|
|
85
|
+
A strip too long for its group fades at each edge that has more labels to
|
|
86
|
+
scroll to: the scroll position drives the fades, and a strip that fits has
|
|
87
|
+
no scroll timeline, so it doesn't fade. Requires scroll-driven animations
|
|
88
|
+
(Chrome 115+, Safari 26+); elsewhere the strip scrolls without the fade.
|
|
89
|
+
*/
|
|
90
|
+
@keyframes markdown-tabs-edges {
|
|
91
|
+
from {
|
|
92
|
+
--_tabs-fade-start: 0px;
|
|
93
|
+
--_tabs-fade-end: 2rem;
|
|
94
|
+
}
|
|
95
|
+
10%,
|
|
96
|
+
90% {
|
|
97
|
+
--_tabs-fade-start: 2rem;
|
|
98
|
+
--_tabs-fade-end: 2rem;
|
|
99
|
+
}
|
|
100
|
+
to {
|
|
101
|
+
--_tabs-fade-start: 2rem;
|
|
102
|
+
--_tabs-fade-end: 0px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@supports (animation-timeline: scroll()) {
|
|
107
|
+
.markdown-tabs-labels {
|
|
108
|
+
--_tabs-fade-direction: to right;
|
|
109
|
+
/* Longhands: minifiers fold `animation` and `animation-timeline` into one shorthand, which browsers reject. */
|
|
110
|
+
animation-name: markdown-tabs-edges;
|
|
111
|
+
animation-timing-function: linear;
|
|
112
|
+
animation-timeline: scroll(self inline);
|
|
113
|
+
mask-image: linear-gradient(
|
|
114
|
+
var(--_tabs-fade-direction),
|
|
115
|
+
transparent,
|
|
116
|
+
#000 var(--_tabs-fade-start),
|
|
117
|
+
#000 calc(100% - var(--_tabs-fade-end)),
|
|
118
|
+
transparent
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
&:dir(rtl) {
|
|
122
|
+
--_tabs-fade-direction: to left;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
66
127
|
/* Hide radio inputs without removing them from the DOM (needed for :has()) */
|
|
67
128
|
.markdown-tabs-labels input[type="radio"] {
|
|
68
129
|
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.3",
|
|
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.4"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/hast": "^3.0.4",
|