@toybreaker/fiko 0.6.0 → 0.6.1

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/omg/5components.css +39 -23
  2. package/package.json +1 -1
@@ -155,20 +155,13 @@ svg:not(:root) {
155
155
  */
156
156
 
157
157
  details.accordion {
158
- border: var(--borderpx) solid var(--border_color);
159
- border-radius: var(--radius);
160
- overflow: hidden;
161
- }
162
-
163
- details.accordion + details.accordion {
164
- margin-top: calc(var(--spaceV) * 0.5);
158
+ border-bottom: var(--borderpx) solid var(--border_color);
165
159
  }
166
160
 
167
161
  details.accordion > summary {
168
162
  display: flex;
169
163
  flex-direction: row;
170
164
  align-items: center;
171
- gap: 1rem;
172
165
  padding: var(--spaceV) var(--spaceH);
173
166
  cursor: pointer;
174
167
  list-style: none;
@@ -189,38 +182,61 @@ details.accordion > summary a {
189
182
  text-decoration: none;
190
183
  }
191
184
 
185
+ /* chevron — down arrow in currentColor, rotates 180° when open */
192
186
  details.accordion > summary::after {
193
- content: var(--accordion_icon_closed, '+');
194
- font-size: 1.4em;
195
- font-weight: 300;
196
- color: var(--cta);
187
+ content: '';
188
+ display: block;
189
+ width: 1.25em;
190
+ height: 1.25em;
197
191
  flex-shrink: 0;
198
- line-height: 1;
199
- transition: color var(--transition);
200
- }
201
-
202
- details.accordion[open] > summary {
203
- border-bottom: var(--borderpx) solid var(--border_color);
192
+ background-color: currentColor;
193
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9'/%3E%3C/svg%3E");
194
+ -webkit-mask-size: contain;
195
+ -webkit-mask-repeat: no-repeat;
196
+ -webkit-mask-position: center;
197
+ mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9'/%3E%3C/svg%3E");
198
+ mask-size: contain;
199
+ mask-repeat: no-repeat;
200
+ mask-position: center;
201
+ transform: rotate(0deg);
202
+ transition: transform var(--transition);
203
+ order: 2;
204
+ margin-left: auto;
204
205
  }
205
206
 
206
207
  details.accordion[open] > summary::after {
207
- content: var(--accordion_icon_open, '×');
208
+ transform: rotate(180deg);
208
209
  }
209
210
 
210
211
  details.accordion > summary:hover {
211
- background: color-mix(in oklch, var(--cta), transparent 90%);
212
+ background: color-mix(in oklch, currentColor, transparent 94%);
212
213
  }
213
214
 
214
215
  details.accordion > :not(summary) {
215
216
  padding: var(--spaceV) var(--spaceH);
216
217
  }
217
218
 
219
+ /* ── ACCORDION DOTTED — dot-leader modifier ─────── */
220
+ /* Usage: <details class="accordion dotted">
221
+ * Adds a dotted leader between the label and the chevron.
222
+ */
223
+
224
+ details.accordion.dotted > summary::before {
225
+ content: '';
226
+ flex: 1;
227
+ border-bottom: var(--borderpx) dotted currentColor;
228
+ margin-inline: 0.5rem;
229
+ align-self: center;
230
+ opacity: 0.3;
231
+ order: 1;
232
+ }
233
+
218
234
  /* ── ACCORDION CHEVRON — SVG arrow marker ────────── */
219
235
  /* Modifier: <details class="accordion accordion_chevron">
220
- * Replaces +/× text with an animated SVG chevron via mask-image.
236
+ * Overrides default down-chevron with a right-pointing SVG arrow.
221
237
  * Closed: → pointing right. Open: rotated 90° pointing down.
222
238
  * Composable: stack with other modifiers for full editorial style.
223
- * Color inherits --cta; override with: style="--cta: var(--brand)"
239
+ * Color: currentColor by default; override with CSS custom property.
224
240
  */
225
241
 
226
242
  details.accordion.accordion_chevron > summary::after,
@@ -230,7 +246,7 @@ details.accordion.accordion_chevron[open] > summary::after {
230
246
  width: 1.25em;
231
247
  height: 1.25em;
232
248
  flex-shrink: 0;
233
- background-color: var(--cta);
249
+ background-color: currentColor;
234
250
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 6L15 12L9 18'/%3E%3C/svg%3E");
235
251
  -webkit-mask-size: contain;
236
252
  -webkit-mask-repeat: no-repeat;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toybreaker/fiko",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "LOOK GOOD OR DIE! — cascade layers, OKLCH colors, design tokens. Zero specificity wars. Smiling DX.",
5
5
  "license": "MIT",
6
6
  "author": "Toybreaker <hello@junglestar.co>",