@fluixi-ui/tokens 0.4.0-alpha.4 → 0.4.0-alpha.5
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/dist/css/sidenav.css +53 -8
- package/package.json +1 -1
package/dist/css/sidenav.css
CHANGED
|
@@ -75,8 +75,11 @@
|
|
|
75
75
|
transition: background var(--flx-ui-duration-fast) var(--flx-ui-ease-standard),
|
|
76
76
|
color var(--flx-ui-duration-fast) var(--flx-ui-ease-standard);
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
/* Hover uses an fg-relative tint (not gray-2, which is invisible on the gray-1
|
|
79
|
+
rail) so it stays legible on any surface, light or dark. `:not([data-active])`
|
|
80
|
+
keeps the active pill from being flattened by hover. */
|
|
81
|
+
:where([data-sidenav-link]:hover:not([data-active])) {
|
|
82
|
+
background: color-mix(in oklab, var(--flx-ui-color-fg) 6%, transparent);
|
|
80
83
|
color: var(--flx-ui-color-fg);
|
|
81
84
|
}
|
|
82
85
|
:where([data-sidenav-link][data-active]) {
|
|
@@ -109,6 +112,7 @@
|
|
|
109
112
|
justify-content: center;
|
|
110
113
|
width: 2rem;
|
|
111
114
|
height: 2rem;
|
|
115
|
+
flex-shrink: 0;
|
|
112
116
|
padding: 0;
|
|
113
117
|
background: transparent;
|
|
114
118
|
border: none;
|
|
@@ -116,23 +120,64 @@
|
|
|
116
120
|
color: var(--flx-ui-color-fg-muted);
|
|
117
121
|
cursor: pointer;
|
|
118
122
|
}
|
|
123
|
+
/* A trigger in the header sits at the trailing edge on its own — the consumer
|
|
124
|
+
drops in <SidenavTrigger/> without wiring any layout. On the compact icon rail
|
|
125
|
+
the header centres its contents, so the auto-margin is dropped. */
|
|
126
|
+
:where([data-sidenav-header] [data-sidenav-trigger]) {
|
|
127
|
+
margin-inline-start: auto;
|
|
128
|
+
}
|
|
129
|
+
:where([data-sidenav][data-state='compact']:not([data-mobile]) [data-sidenav-header] [data-sidenav-trigger]) {
|
|
130
|
+
margin-inline-start: 0;
|
|
131
|
+
}
|
|
119
132
|
:where([data-sidenav-trigger]:hover) {
|
|
120
|
-
background: var(--flx-ui-color-
|
|
133
|
+
background: color-mix(in oklab, var(--flx-ui-color-fg) 6%, transparent);
|
|
121
134
|
color: var(--flx-ui-color-fg);
|
|
122
135
|
}
|
|
123
136
|
:where([data-sidenav-trigger]:focus-visible) {
|
|
124
137
|
outline: var(--flx-ui-ctl-ring);
|
|
125
138
|
outline-offset: 2px;
|
|
126
139
|
}
|
|
140
|
+
/* Built-in trigger icon: a chevron pointing in the collapse direction, flipping
|
|
141
|
+
between expanded and compact (and mirrored for a right-side rail). */
|
|
142
|
+
:where([data-sidenav-trigger-icon]) {
|
|
143
|
+
display: block;
|
|
144
|
+
width: 1.15em;
|
|
145
|
+
height: 1.15em;
|
|
146
|
+
background: currentColor;
|
|
147
|
+
mask: var(--flx-ui-chevron-down) center / contain no-repeat;
|
|
148
|
+
-webkit-mask: var(--flx-ui-chevron-down) center / contain no-repeat;
|
|
149
|
+
transform: rotate(90deg);
|
|
150
|
+
transition: transform var(--flx-ui-duration-normal) var(--flx-ui-ease-standard);
|
|
151
|
+
}
|
|
152
|
+
:where([data-sidenav][data-collapsed] [data-sidenav-trigger-icon]),
|
|
153
|
+
:where([data-sidenav][data-side='right'] [data-sidenav-trigger-icon]) {
|
|
154
|
+
transform: rotate(-90deg);
|
|
155
|
+
}
|
|
156
|
+
:where([data-sidenav][data-side='right'][data-collapsed] [data-sidenav-trigger-icon]) {
|
|
157
|
+
transform: rotate(90deg);
|
|
158
|
+
}
|
|
127
159
|
|
|
128
|
-
/* Compact icon rail:
|
|
129
|
-
the mobile drawer, which
|
|
130
|
-
|
|
131
|
-
|
|
160
|
+
/* Compact icon rail: collapse each row to its leading icon. Scoped to `compact`
|
|
161
|
+
(not the mobile drawer, which is full-width; `hidden` is clipped anyway).
|
|
162
|
+
Applies to DIRECT rail rows ONLY — a sub's flyout content is portalled OUTSIDE
|
|
163
|
+
[data-sidenav], so these descendant rules never reach it (subitems keep their
|
|
164
|
+
labels in the popup). Three ways an element hides in compact:
|
|
165
|
+
1. [data-sidenav-label] / [data-sidenav-group-label] — the recommended wrapper.
|
|
166
|
+
2. [data-sidenav-hide-compact] — an explicit opt-in marker for ANY element.
|
|
167
|
+
3. auto — any non-leading child of a link / sub-trigger (the first child is the
|
|
168
|
+
icon), so unmarked label text collapses with no extra markup. */
|
|
169
|
+
:where([data-sidenav][data-state='compact']:not([data-mobile]))
|
|
170
|
+
:where([data-sidenav-label], [data-sidenav-group-label], [data-sidenav-hide-compact]) {
|
|
171
|
+
display: none;
|
|
172
|
+
}
|
|
173
|
+
:where([data-sidenav][data-state='compact']:not([data-mobile]))
|
|
174
|
+
:where([data-sidenav-link], [data-sidenav-sub-trigger]) > :not(:first-child) {
|
|
132
175
|
display: none;
|
|
133
176
|
}
|
|
134
|
-
:where([data-sidenav][data-state='compact']:not([data-mobile])
|
|
177
|
+
:where([data-sidenav][data-state='compact']:not([data-mobile]))
|
|
178
|
+
:where([data-sidenav-link], [data-sidenav-sub-trigger]) {
|
|
135
179
|
justify-content: center;
|
|
180
|
+
gap: 0;
|
|
136
181
|
padding-inline: 0;
|
|
137
182
|
}
|
|
138
183
|
|