@toybreaker/fiko 0.1.0 → 0.3.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # 404.css
1
+ # fiko
2
2
 
3
3
  **A minimal, layered CSS foundation you override by design, not by accident.**
4
4
 
@@ -14,7 +14,7 @@ Modern CSS frameworks fall into two traps:
14
14
  1. **Too much opinion** — ship components that look like every other site, forcing you to fight the framework to express your brand.
15
15
  2. **Too much complexity** — utility-only systems (Tailwind, etc.) put all design decisions in HTML, making templates hard to read and refactor.
16
16
 
17
- 404.css takes a third path: a minimal, layered foundation you override by design, not by accident.
17
+ fiko takes a third path: a minimal, layered foundation you override by design, not by accident.
18
18
 
19
19
  ---
20
20
 
@@ -43,7 +43,7 @@ This imports `omg/` — the brand-agnostic framework. It declares six cascade la
43
43
 
44
44
  ```bash
45
45
  # copy the starter brand files into your project
46
- cp node_modules/@toybreaker/fiko/template/000/ src/assets/404/000/ -r
46
+ cp node_modules/@toybreaker/fiko/template/branding/ src/assets/fiko/branding/ -r
47
47
  ```
48
48
 
49
49
  Then import your brand tokens **after** the framework, inside the same layers:
@@ -52,18 +52,18 @@ Then import your brand tokens **after** the framework, inside the same layers:
52
52
  @import "@toybreaker/fiko";
53
53
 
54
54
  /* brand palette — loads in the tokens layer */
55
- @import url(./000/1client_vars.css) layer(tokens);
55
+ @import url(./branding/1client_vars.css) layer(tokens);
56
56
 
57
57
  /* semantic aliases (surface, text, cta) — loads in the theme layer */
58
- @import url(./000/2client_datatheme.css) layer(theme);
58
+ @import url(./branding/2client_datatheme.css) layer(theme);
59
59
 
60
60
  /* element defaults, heading scale — loads in the theme layer */
61
- @import url(./000/3client_theme.css) layer(theme);
61
+ @import url(./branding/3client_theme.css) layer(theme);
62
62
  ```
63
63
 
64
64
  ### 3. Customize your brand
65
65
 
66
- Edit `000/1client_vars.css` — change the hue angle for your brand color:
66
+ Edit `branding/1client_vars.css` — change the hue angle for your brand color:
67
67
 
68
68
  ```css
69
69
  --brand: oklch(0.55 0.19 28); /* orange — change the hue (0–360) */
@@ -71,10 +71,10 @@ Edit `000/1client_vars.css` — change the hue angle for your brand color:
71
71
 
72
72
  ---
73
73
 
74
- ## Architecture: `omg/` vs `000/`
74
+ ## Architecture: `omg/` vs `branding/`
75
75
 
76
76
  ```
77
- 404/
77
+ fiko/
78
78
  ├── omg/ ← THE FRAMEWORK — brand-agnostic, versioned, never touch
79
79
  │ ├── 0reset.css
80
80
  │ ├── 1vars.css ← layout, spacing, typography tokens
@@ -84,13 +84,13 @@ Edit `000/1client_vars.css` — change the hue angle for your brand color:
84
84
  │ ├── 6states.css ← data-state helpers
85
85
  │ └── utils/ ← atomic utility classes
86
86
 
87
- └── 000/ ← YOUR BRAND — per-client, fully owned, never extracted
87
+ └── branding/ ← YOUR BRAND — per-client, fully owned, never extracted
88
88
  ├── 1client_vars.css ← raw palette (OKLCH colors)
89
89
  ├── 2client_datatheme.css ← semantic aliases (surface, text, cta…)
90
90
  └── 3client_theme.css ← element defaults, heading scale, brand specifics
91
91
  ```
92
92
 
93
- **The rule:** if it could work on any website → `omg/`. If it's specific to one brand → `000/`.
93
+ **The rule:** if it could work on any website → `omg/`. If it's specific to one brand → `branding/`.
94
94
 
95
95
  ---
96
96
 
@@ -144,7 +144,7 @@ All color tokens use OKLCH:
144
144
 
145
145
  ---
146
146
 
147
- ## What 404.css Intentionally Does NOT Do
147
+ ## What fiko Intentionally Does NOT Do
148
148
 
149
149
  - **No dark mode** — permanent light mode
150
150
  - **No JavaScript** — pure CSS
@@ -155,9 +155,9 @@ All color tokens use OKLCH:
155
155
 
156
156
  ## Pairing with Astro
157
157
 
158
- 404.css was designed to pair with Astro scoped styles:
158
+ fiko was designed to pair with Astro scoped styles:
159
159
 
160
- - 404.css owns the global layer stack (reset → utilities)
160
+ - fiko owns the global layer stack (reset → utilities)
161
161
  - Astro components own their own layout via `<style>` blocks
162
162
  - Zero specificity conflicts
163
163
 
package/index.css CHANGED
@@ -2,7 +2,7 @@
2
2
  * 🐉 404.css v0.1.0-alpha.1
3
3
  * https://github.com/junglesta/404css
4
4
  *
5
- * Copyright (c) 2024–2025 Toybreaker
5
+ * Copyright (c) 2024–2026 Toybreaker
6
6
  * Released under the MIT License
7
7
  *
8
8
  * An unknown modern CSS framework.
@@ -25,7 +25,7 @@
25
25
  */
26
26
 
27
27
  /* CASCADING ORDER — declared first so all @imports know their place */
28
- @layer reset, tokens, theme, layout, components, utilities;
28
+ @layer reset, tokens, base, theme, layout, components, utilities;
29
29
 
30
30
  /* RESET */
31
31
  @import url(omg/0reset.css) layer(reset);
@@ -33,8 +33,9 @@
33
33
  /* TOKENS — framework spacing, typography, motion */
34
34
  @import url(omg/1vars.css) layer(tokens);
35
35
 
36
- /* LAYOUT — element defaults, grid, container, states */
37
- @import url(omg/3base.css) layer(layout);
36
+ /* BASE — element defaults (h1-h6, p, ol/ul, blockquote, hr, body structure)
37
+ * Sits below client theme so brand overrides in 3client_theme.css always win */
38
+ @import url(omg/3base.css) layer(base);
38
39
  @import url(omg/4layout.css) layer(layout);
39
40
  @import url(omg/6states.css) layer(layout);
40
41
 
@@ -42,10 +43,10 @@
42
43
  @import url(omg/5components.css) layer(components);
43
44
 
44
45
  /* UTILITIES — highest priority, no !important needed */
45
- @import url(omg/utils/text.css) layer(utilities);
46
+ @import url(omg/utils/text.css) layer(utilities);
46
47
  @import url(omg/utils/visibility.css) layer(utilities);
47
- @import url(omg/utils/layout.css) layer(utilities);
48
- @import url(omg/utils/spacing.css) layer(utilities);
49
- @import url(omg/utils/aspect.css) layer(utilities);
50
- @import url(omg/utils/gradients.css) layer(utilities);
51
- @import url(omg/utils/misc.css) layer(utilities);
48
+ @import url(omg/utils/layout.css) layer(utilities);
49
+ @import url(omg/utils/spacing.css) layer(utilities);
50
+ @import url(omg/utils/aspect.css) layer(utilities);
51
+ @import url(omg/utils/gradients.css) layer(utilities);
52
+ @import url(omg/utils/misc.css) layer(utilities);
package/omg/1vars.css CHANGED
@@ -1,8 +1,17 @@
1
1
  /*! 🐉 404.css | MIT License */
2
- /* 1vars.css — layout, spacing, typography tokens */
3
- /* Color tokens live in 000/1client_vars.css */
2
+ /* 1vars.css — layout, spacing, typography tokens */
3
+ /* Brand palette overrides live in branding/1client_vars.css */
4
4
 
5
5
  :root {
6
+ /* ── COLOR NEUTRALS ──────────────────────────── */
7
+ --dark: oklch(0.20 0 0);
8
+ --darkT25: color-mix(in oklch, var(--dark), transparent 75%);
9
+ --darkT50: color-mix(in oklch, var(--dark), transparent 50%);
10
+
11
+ --light: oklch(0.97 0 0);
12
+ --lightT25: color-mix(in oklch, var(--light), transparent 75%);
13
+ --lightT50: color-mix(in oklch, var(--light), transparent 50%);
14
+
6
15
  /* ── MOTION ─────────────────────────────────── */
7
16
  --transition: 200ms ease-out;
8
17
  --ease_out: cubic-bezier(0.22, 1, 0.36, 1);
package/omg/3base.css CHANGED
@@ -27,3 +27,77 @@ video {
27
27
  height: 100%;
28
28
  object-fit: cover;
29
29
  }
30
+
31
+ /* ── BODY STRUCTURE ─────────────────────────────── */
32
+
33
+ body {
34
+ width: 100%;
35
+ margin: 0;
36
+ padding: 0;
37
+ font-weight: var(--weight_light);
38
+ }
39
+
40
+ body > header,
41
+ body > main,
42
+ body > footer {
43
+ width: 100%;
44
+ margin-inline: auto;
45
+ line-height: var(--line_height);
46
+ }
47
+
48
+ /* ── TYPOGRAPHY ELEMENTS ────────────────────────── */
49
+
50
+ strong { font-weight: var(--weight_bold); }
51
+
52
+ p {
53
+ padding-block: var(--spaceV);
54
+ line-height: 1.5;
55
+ }
56
+
57
+ h1, h2, h3, h4, h5, h6 {
58
+ user-select: none;
59
+ line-height: 1.5;
60
+ font-family: var(--font_family);
61
+ font-weight: var(--weight_light);
62
+ }
63
+
64
+ /* ── HR ─────────────────────────────────────────── */
65
+
66
+ hr {
67
+ border: 0 none;
68
+ border-top: 0.5px solid currentColor;
69
+ opacity: 0.5;
70
+ }
71
+
72
+ /* ── BLOCKQUOTE ─────────────────────────────────── */
73
+
74
+ blockquote {
75
+ display: block;
76
+ margin: calc(var(--spaceV) * 8) calc(var(--spaceH) * 4);
77
+ padding: var(--spaceV) calc(var(--spaceH) * 4);
78
+ border-left: 4px solid currentColor;
79
+ line-height: 1.2;
80
+ font-size: 120%;
81
+ font-style: italic;
82
+ }
83
+
84
+ cite {
85
+ display: block;
86
+ padding-top: var(--spaceV);
87
+ font-size: 66%;
88
+ text-transform: capitalize;
89
+ }
90
+
91
+ /* ── LISTS ──────────────────────────────────────── */
92
+
93
+ ol, ul {
94
+ list-style: none;
95
+ padding: 0;
96
+ margin: 0;
97
+ }
98
+
99
+ /* ── LANGUAGE SWITCHING ─────────────────────────── */
100
+
101
+ [lang="en"] { .lang_it, .lang_id { display: none; } }
102
+ [lang="it"] { .lang_en, .lang_id { display: none; } }
103
+ [lang="id"] { .lang_it, .lang_en { display: none; } }
package/omg/4layout.css CHANGED
@@ -74,3 +74,31 @@ nav li {
74
74
  width: 100%;
75
75
  }
76
76
  }
77
+
78
+ /* ── BENTO BOX ──────────────────────────────────── */
79
+ /* Mosaic product grid. Wrap cards in <div class="bento"> */
80
+
81
+ .bento {
82
+ display: grid;
83
+ grid-template-columns: 1fr;
84
+ gap: calc(var(--spaceV) * 0.5) calc(var(--spaceH) * 0.5);
85
+ width: 100%;
86
+ }
87
+
88
+ .bento > :first-child { grid-column: 1 / -1; }
89
+
90
+ .bento > :nth-child(7n + 1):not(:first-child) { grid-column: 1 / -1; }
91
+
92
+ @container main-container (min-width: 480px) {
93
+ .bento { grid-template-columns: 1fr 1fr; }
94
+ }
95
+
96
+ @container main-container (min-width: 640px) {
97
+ .bento { grid-template-columns: 1fr 1fr 1fr; }
98
+ .bento > :first-child { grid-column: 1 / 3; grid-row: 1 / 3; }
99
+ }
100
+
101
+ @container main-container (min-width: 960px) {
102
+ .bento { grid-template-columns: repeat(4, 1fr); }
103
+ .bento > :first-child { grid-column: 1 / 3; grid-row: 1 / 3; }
104
+ }
@@ -99,3 +99,118 @@ svg:not(:root) {
99
99
  top: 0;
100
100
  z-index: 20;
101
101
  }
102
+
103
+ /* ── HEADING SCALE ──────────────────────────────── */
104
+
105
+ .h1, .h2, .h3, .h4, .h5, .h6 {
106
+ user-select: none !important;
107
+ line-height: 1.2 !important;
108
+ font-family: var(--font_family) !important;
109
+ }
110
+ .h1 { font-size: calc(var(--font_size) * 2.5) !important; font-weight: var(--weight_light) !important; }
111
+ .h2 { font-size: calc(var(--font_size) * 2.0) !important; font-weight: var(--weight_light) !important; }
112
+ .h3 { font-size: calc(var(--font_size) * 1.75) !important; font-weight: var(--weight_thin) !important; }
113
+ .h4 { font-size: calc(var(--font_size) * 1.5) !important; font-weight: var(--weight_thin) !important; }
114
+ .h5 { font-size: calc(var(--font_size) * 1.25) !important; font-weight: var(--weight_thin) !important; }
115
+ .h6 { font-size: calc(var(--font_size) * 1.0) !important; font-weight: var(--weight_light) !important; }
116
+
117
+ /* ── TEXT UTILITIES ─────────────────────────────── */
118
+
119
+ .dim {
120
+ color: var(--textT50);
121
+ font-size: calc(var(--font_size) * 0.85);
122
+ }
123
+
124
+ .underline {
125
+ text-decoration: underline;
126
+ text-underline-offset: 3px;
127
+ }
128
+
129
+ .typewriter {
130
+ max-width: 66ch;
131
+ margin-inline: auto;
132
+ }
133
+
134
+ .cat { text-transform: capitalize; }
135
+
136
+ /* ── LAYOUT UTILITIES ───────────────────────────── */
137
+
138
+ .maximise {
139
+ margin-left: var(--maximise);
140
+ margin-right: var(--maximise);
141
+ }
142
+
143
+ .clipped-circle {
144
+ clip-path: circle(50px at center);
145
+ }
146
+
147
+ /* ── ACCORDION ──────────────────────────────────── */
148
+ /* Usage: <details class="accordion"><summary>Title</summary><div>…</div></details>
149
+ * Icon tokens: --accordion_icon_open / --accordion_icon_closed (default + / ×)
150
+ * Override per-element: style="--accordion_icon_closed: '▶'; --accordion_icon_open: '▼'"
151
+ */
152
+
153
+ details.accordion {
154
+ border: var(--borderpx) solid var(--border_color);
155
+ border-radius: var(--radius);
156
+ overflow: hidden;
157
+ }
158
+
159
+ details.accordion + details.accordion {
160
+ margin-top: calc(var(--spaceV) * 0.5);
161
+ }
162
+
163
+ details.accordion > summary {
164
+ display: flex;
165
+ align-items: center;
166
+ justify-content: space-between;
167
+ gap: 1rem;
168
+ padding: var(--spaceV) var(--spaceH);
169
+ cursor: pointer;
170
+ list-style: none;
171
+ font-weight: var(--weight_regular);
172
+ user-select: none;
173
+ min-height: unset;
174
+ transition: background-color var(--transition);
175
+ }
176
+
177
+ details.accordion > summary::-webkit-details-marker { display: none; }
178
+
179
+ details.accordion > summary::after {
180
+ content: var(--accordion_icon_closed, '+');
181
+ font-size: 1.4em;
182
+ font-weight: 300;
183
+ color: var(--cta);
184
+ flex-shrink: 0;
185
+ line-height: 1;
186
+ transition: color var(--transition);
187
+ }
188
+
189
+ details.accordion[open] > summary {
190
+ border-bottom: var(--borderpx) solid var(--border_color);
191
+ }
192
+
193
+ details.accordion[open] > summary::after {
194
+ content: var(--accordion_icon_open, '×');
195
+ }
196
+
197
+ details.accordion > summary:hover {
198
+ background: color-mix(in oklch, var(--cta), transparent 90%);
199
+ }
200
+
201
+ details.accordion > :not(summary) {
202
+ padding: var(--spaceV) var(--spaceH);
203
+ }
204
+
205
+ /* ── DOT LEADER ─────────────────────────────────── */
206
+ /* Usage: <span class="dots"> between label and value in menus/TOC */
207
+
208
+ .dots {
209
+ flex: 8;
210
+ border-bottom: var(--borderpx) dotted currentColor;
211
+ margin: 0 0 0 8px;
212
+ height: var(--borderpx);
213
+ position: relative;
214
+ top: 0;
215
+ opacity: 0.25;
216
+ }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@toybreaker/fiko",
3
- "version": "0.1.0",
4
- "description": "An unknown modern CSS framework. Implementing issues gone 404. SMILING DX!",
3
+ "version": "0.3.2",
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>",
7
- "homepage": "https://github.com/junglesta/fiko",
7
+ "homepage": "https://junglesta.github.io/fiko/demo/",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/junglesta/fiko.git"
10
+ "url": "git+https://github.com/junglesta/fiko.git"
11
11
  },
12
12
  "bugs": {
13
13
  "url": "https://github.com/junglesta/fiko/issues"
@@ -0,0 +1,32 @@
1
+ /*! 🐉 404.css | MIT License */
2
+ /* branding/1client_vars.css — brand palette tokens
3
+ *
4
+ * Neutrals (--dark, --light and alpha variants) are defined in
5
+ * omg/1vars.css — override here only if your brand uses a tinted surface.
6
+ *
7
+ * Add brand-specific tokens: --brand, --nobori, --surface_*, gradients, etc.
8
+ */
9
+
10
+ :root {
11
+ /* ── LIGHT OVERRIDE (optional) ──────────────────── */
12
+ /* Uncomment and set if your brand uses a tinted surface instead of neutral white:
13
+ * --light: oklch(0.84 0.028 74); ← warm sand example
14
+ */
15
+
16
+ /* ── BRAND COLOR ────────────────────────────────── */
17
+ /* Change the hue (0–360) to match your brand.
18
+ * red oklch(0.55 0.22 20) · orange oklch(0.55 0.19 40)
19
+ * green oklch(0.45 0.18 145) · blue oklch(0.50 0.20 250)
20
+ */
21
+ --brand: oklch(0.55 0.19 28); /* ← change me */
22
+ --brand_lighter: oklch(from var(--brand) calc(l + 0.08) c h);
23
+ --brand_darker: oklch(from var(--brand) calc(l - 0.18) c h);
24
+ --brand_invert: oklch(from var(--brand) l c calc(h + 180)); /* complementary — auto-updates with --brand */
25
+ --brandT25: color-mix(in oklch, var(--brand), transparent 75%);
26
+ --brandT50: color-mix(in oklch, var(--brand), transparent 50%);
27
+
28
+ /* ── PAGE SURFACES ──────────────────────────────── */
29
+ /* Add named surfaces for sections, e.g.:
30
+ * --surface_hero: oklch(0.92 0.02 28);
31
+ */
32
+ }
@@ -0,0 +1,12 @@
1
+ /*! 🐉 404.css | MIT License */
2
+ /* branding/3client_theme.css — brand-specific overrides
3
+ *
4
+ * .h1–.h6, .dim, .underline, .typewriter, .dots, .maximise,
5
+ * .clipped-circle, .cat, .bento, [lang] switching are in fiko core.
6
+ * Add brand/client-specific rules here only.
7
+ */
8
+
9
+ /* ── EXAMPLE OVERRIDES ──────────────────────────── */
10
+
11
+ /* .typewriter { font-family: var(--font_serif); } */
12
+ /* blockquote.typewriter { border-left-style: dotted; } */
@@ -1,40 +0,0 @@
1
- /*! 🐉 404.css | MIT License */
2
- /* 000/1client_vars.css — brand palette tokens
3
- *
4
- * Copy this file into your project's 000/ folder.
5
- * Customize the values below for your brand.
6
- * This file loads in the `tokens` layer alongside omg/1vars.css.
7
- */
8
-
9
- :root {
10
- /* ── NEUTRALS ──────────────────────────────────── */
11
- --dark: oklch(0.20 0 0);
12
- --darkT25: color-mix(in oklch, var(--dark), transparent 75%);
13
- --darkT50: color-mix(in oklch, var(--dark), transparent 50%);
14
-
15
- --light: oklch(0.97 0 0);
16
- --lightT25: color-mix(in oklch, var(--light), transparent 75%);
17
- --lightT50: color-mix(in oklch, var(--light), transparent 50%);
18
-
19
- /* ── BRAND COLOR ───────────────────────────────── */
20
- /* Change the hue (0–360) to match your brand.
21
- * Lightness (0–1) and chroma (0–0.37) control shade and saturation.
22
- * Examples:
23
- * red oklch(0.55 0.22 20)
24
- * orange oklch(0.55 0.19 40)
25
- * green oklch(0.45 0.18 145)
26
- * blue oklch(0.50 0.20 250)
27
- * purple oklch(0.45 0.22 290)
28
- */
29
- --brand: oklch(0.55 0.19 28); /* ← change me */
30
- --brand_lighter: oklch(from var(--brand) calc(l + 0.08) c h);
31
- --brand_darker: oklch(from var(--brand) calc(l - 0.18) c h);
32
- --brandT25: color-mix(in oklch, var(--brand), transparent 75%);
33
- --brandT50: color-mix(in oklch, var(--brand), transparent 50%);
34
-
35
- /* ── PAGE SURFACES ─────────────────────────────── */
36
- /* --surface is defined in 2client_datatheme.css as var(--light).
37
- * Add custom section surfaces here as needed, e.g.:
38
- * --surface_hero: oklch(0.92 0.02 var(--brand-hue));
39
- */
40
- }
@@ -1,37 +0,0 @@
1
- /*! 🐉 404.css | MIT License */
2
- /* 000/3client_theme.css — element & component defaults
3
- *
4
- * Brand-specific overrides that sit on top of the framework.
5
- * Loaded in the `theme` layer — below utilities, above components.
6
- * Customize freely. All rules here are brand-specific, not framework rules.
7
- */
8
-
9
- /* ── TYPOGRAPHY SCALE ─────────────────────────────────────────── */
10
-
11
- .h1 { font-size: calc(var(--font_size) * 2.5) !important; font-weight: var(--weight_light) !important; }
12
- .h2 { font-size: calc(var(--font_size) * 2.0) !important; font-weight: var(--weight_light) !important; }
13
- .h3 { font-size: calc(var(--font_size) * 1.75) !important; font-weight: var(--weight_thin) !important; }
14
- .h4 { font-size: calc(var(--font_size) * 1.5) !important; font-weight: var(--weight_thin) !important; }
15
- .h5 { font-size: calc(var(--font_size) * 1.25) !important; font-weight: var(--weight_thin) !important; }
16
- .h6 { font-size: calc(var(--font_size) * 1.0) !important; font-weight: var(--weight_light) !important; }
17
-
18
- /* ── DIM — secondary text ──────────────────────────────────────── */
19
-
20
- .dim {
21
- color: var(--textT50);
22
- font-size: calc(var(--font_size) * 0.85);
23
- }
24
-
25
- /* ── UNDERLINE LINK ───────────────────────────────────────────── */
26
-
27
- .underline {
28
- text-decoration: underline;
29
- text-underline-offset: 3px;
30
- }
31
-
32
- /* ── TYPEWRITER — constrained readable prose column ─────────────── */
33
-
34
- .typewriter {
35
- max-width: 66ch;
36
- margin-inline: auto;
37
- }