kni-cascade 1.2.0 → 1.3.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kni-cascade",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "KNI Cascade — an opinionated SCSS engine and single source of truth for design scaling.",
5
5
  "main": "scss",
6
6
  "engines": {
package/readme.md CHANGED
@@ -20,7 +20,7 @@ It’s designed for **clarity, scalability, and minimal friction** — a single
20
20
  <td>
21
21
  <ul>
22
22
  <li>Modern, layered structure that fixes inheritance issues</li>
23
- <li>Clear separation of responsibility → <BR><code>00-config → 01-base → 02-components → 03-modules → 04-pages</code></li>
23
+ <li>Clear separation of responsibility → <BR><code>00-sass → 01-base → 02-components → 03-modules → 04-pages</code></li>
24
24
  <li>Config-first system — tokens, mixins, and primitives power everything downstream</li>
25
25
  </ul>
26
26
  </td>
@@ -51,7 +51,7 @@ It’s designed for **clarity, scalability, and minimal friction** — a single
51
51
 
52
52
  ```plaintext
53
53
  scss/
54
- ├── 00-config/ # Tokens, mixins, functions, no CSS output
54
+ ├── 00-sass/ # Settings, Sass vars, mixins, functions, no CSS output
55
55
  ├── 01-base/ # Resets, type, layout, and core utilities
56
56
  ├── 02-components/ # Globally-available UI elements (header, footer, buttons, etc.)
57
57
  ├── 03-modules/ # Page body building blocks
@@ -92,11 +92,10 @@ By default, **Gulp** runs:
92
92
 
93
93
  ## Design Principles
94
94
 
95
- 1. **Settings-first** – All editable project values live in `_settings.scss`.
96
- 2. **No CSS output in config** – Logic, not styling.
97
- 3. **Token inheritance** – Everything flows from primitives to components.
98
- 4. **Small overrides > big rewrites** – The cascade should always work with you.
99
- 5. **Readable by default** – Comments are documentation.
95
+
96
+ 1. **No CSS output in 00-sass** – Logic, not styling.
97
+ 2. **Small overrides > big rewrites** – The cascade should always work with you.
98
+ 3. **Readable by default** – Comments are documentation.
100
99
 
101
100
  ---
102
101
 
@@ -119,7 +118,7 @@ By default, **Gulp** runs:
119
118
 
120
119
  ## 🪄 Quick Philosophy
121
120
 
122
- > If it defines how the system works is a Sass function, mixin or variable, it lives in config.
121
+ > If it defines how the system works is a Sass function, mixin or variable, it lives in sass.
123
122
  > If it’s a globally-used reset, type, or layout rule, it lives in base.
124
123
  > If it’s a globally-used element, it lives in components.
125
124
  > If it's a page body building block, it lives in modules.
@@ -6,7 +6,6 @@
6
6
  // without generating any CSS.
7
7
  // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
8
8
 
9
- @forward 'primitives';
10
- @forward 'settings';
9
+ @forward 'variables';
11
10
  @forward 'functions';
12
11
  @forward 'mixins';
@@ -1,6 +1,5 @@
1
1
  @use "sass:map";
2
- @use "./primitives" as *;
3
- @use "./settings" as *;
2
+ @use "./variables" as *;
4
3
 
5
4
  // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
6
5
  // 🎨 Mixins
@@ -1,5 +1,5 @@
1
1
  // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
2
- // ⚙️ Settings
2
+ // ⚙️ Variables
3
3
  // Project-level controls and design tokens — the file to edit.
4
4
  // Turn these knobs to adjust site behavior, type scales, or theme values.
5
5
  // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
@@ -21,14 +21,30 @@ $type-scale: (
21
21
  heading-s: (desktop: 26, mobile: 20),
22
22
  heading-xs: (desktop: 20, mobile: 18),
23
23
  heading-xxs: (desktop: 18, mobile: 16),
24
- body-l: (desktop: 18, mobile: 16),
25
- body-m: (desktop: 16, mobile: 14),
26
- body-s: (desktop: 14, mobile: 12),
27
- body-xs: (desktop: 12, mobile: 11),
28
- body-xxs: (desktop: 11, mobile: 10),
29
- body-xxxs: (desktop: 10, mobile: 10)
24
+ body-l: (desktop: 18, mobile: 16),
25
+ body-m: (desktop: 16, mobile: 14),
26
+ body-s: (desktop: 14, mobile: 12),
27
+ body-xs: (desktop: 12, mobile: 11),
28
+ body-xxs: (desktop: 11, mobile: 10),
29
+ body-xxxs: (desktop: 10, mobile: 10)
30
30
  );
31
31
 
32
32
  // Colors
33
33
  $white: #fff;
34
34
  $black: #000;
35
+
36
+ // Breakpoints for Sassy mqs - see mixins
37
+ $ms: 320 !default; // Mobile small
38
+ $mm: 375 !default; // Mobile medium
39
+ $ml: 500 !default; // Mobile large
40
+ $ts: 600 !default; // Tablet small
41
+ $tm: 768 !default; // Tablet medium
42
+ $tl: 1024 !default; // Tablet large
43
+ $dxs: $tl !default; // Desktop x-small
44
+ $ds: 1280 !default; // Desktop small
45
+ $dm: 1440 !default; // Desktop medium
46
+ $dl: 1600 !default; // Desktop large
47
+ $dxl: 1800 !default; // Desktop x-large
48
+
49
+ $type-scale-breakpoint: $tm !default;
50
+
@@ -1,6 +1,6 @@
1
1
  /* this is base index */
2
- @forward 'settings';
3
- @forward 'primitives';
2
+ @forward 'scaling';
3
+ @forward 'motion';
4
4
  @forward 'reset';
5
5
  @forward 'typography';
6
6
  @forward 'layout';
@@ -1,19 +1,27 @@
1
- @use '../00-config' as *;
1
+ @use '../00-sass' as *;
2
+
3
+ // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
4
+ // 📐 Layout
5
+ // Media Queries, containers, and other layout-related styles
6
+ // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
7
+
8
+ // Layout Defaults
9
+ :root {
10
+ --container-size: 1280pxv;
11
+ --mobile-gutters: 5%;
12
+ --border-radius: 5pxv;
13
+ }
2
14
 
3
- // 🧩 Responsive Engine
15
+ // Responsive Engine
4
16
  // -----------------------------------------------------------------------------
5
- // This is our magic "it just works" responsive engine but there are other
6
- // ways to set up a primary container. Todo: show examples
17
+ // This is our magic "it just works" responsive media query but there are other
18
+ // ways to set up a primary container.
7
19
  // |--------------------|-------------------------------------------|-----------
8
20
  // | Mobile (375) | Desktop (1440) | No scale
9
21
  // |--------------------|-------------------------------------------|-----------
10
22
  // | min:320 max:767 | min:768 max:1800 |
11
23
  // |--------------------|-------------------------------------------|-----------
12
24
 
13
- // kill the wp-admin bar
14
-
15
- @include wp-admin-bar;
16
-
17
25
  // Primary Media Query
18
26
  @media (width >= 768px) {
19
27
  :root {
@@ -26,6 +34,10 @@
26
34
  }
27
35
  }
28
36
 
37
+ // kill the wp-admin bar
38
+ @include wp-admin-bar;
39
+
40
+
29
41
  body {
30
42
  min-height: 100vh;
31
43
  }
@@ -0,0 +1,8 @@
1
+ // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
2
+ // ⏱️ Motion
3
+ // Easing curves, transitions, and animation timing for interactive experiences
4
+ // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
5
+
6
+ :root {
7
+ --easing: cubic-bezier(0.23, 1, 0.32, 1); // Michael Jordan Magic Johnson
8
+ }
@@ -1,9 +1,8 @@
1
- @use '../00-config' as *;
1
+ @use '../00-sass' as *;
2
2
 
3
3
  // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
4
- // 📝 Primitives
5
- // System-level "physics" of the design system how scaling, pxv units,
6
- // and fluid typography behave under the hood. You normally don’t edit this.
4
+ // 📏 Scaling
5
+ // Responsive engine powering sitewide scaling and pxv unit calculations.
7
6
  // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
8
7
 
9
8
  :root {
@@ -16,12 +15,12 @@
16
15
  --mobile-squish:0;
17
16
 
18
17
  // Desktop defaults
19
- --desktop-basis-w: 1440; // figma width
20
- --desktop-basis-h: 750; // height at which you want site to scale vertically
21
- --desktop-min: 768;
22
- --desktop-max: 2000;
23
- --desktop-squish: 0.5; // amount to scale height at --desktop-basis
24
- --desktop-floor: 500; // height at which to top scaling vertically
18
+ --desktop-basis-w: 1440; // Figma width
19
+ --desktop-basis-h: 750; // height at which you want site to scale vertically
20
+ --desktop-min: 768; // Desktop starts here
21
+ --desktop-max: 2000; // Desktop ends here
22
+ --desktop-squish: 1; // amount to scale height at --desktop-basis
23
+ --desktop-floor: 500; // height at which to top scaling vertically
25
24
 
26
25
  // default to mobile sizing
27
26
  --active-basis-w: var(--mobile-basis-w);
@@ -37,7 +36,6 @@
37
36
  // safe vh used in pxv calculations
38
37
  --safe-vh: max(1vh, 1px * var(--active-floor) / 100);
39
38
 
40
-
41
39
  // pxv unit -
42
40
  /* stylelint-disable */
43
41
  @if $enable-pxv {
@@ -53,9 +51,4 @@
53
51
  // Fluid type primitives
54
52
  --font-max-clamp: 9999px; // no touch
55
53
  --font-size: 16pxv; // fluid-type base font size
56
-
57
- // system font stacks
58
- --font-family-system: system-ui, helvetica,arial, sans-serif;
59
- --font-family-heading: var(--font-family-system);
60
- --font-family-monospace: ui-monospace, sfmono-regular, menlo, monaco, consolas, 'Liberation Mono', 'Courier New', monospace;
61
- }
54
+ }
@@ -1,19 +1,25 @@
1
- @use '../00-config' as *;
1
+ @use '../00-sass' as *;
2
2
 
3
3
  // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
4
4
  // 📄 _typography.scss
5
5
  // Type system + custom styles
6
6
  // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
7
7
 
8
- // Toggle fluid-type in settings.scss
9
- @if $enable-fluid-type {
10
- @include fluid-type;
8
+ // Default type settings
9
+ :root {
10
+ --font-family-system: system-ui, helvetica,arial, sans-serif;
11
+ --font-family-heading: var(--font-family-system);
12
+ --font-family-monospace: ui-monospace, sfmono-regular, menlo, monaco, consolas, 'Liberation Mono', 'Courier New', monospace;
13
+ --font-min-clamp: 11px; // default min-size for all type
14
+ --line-height: 1.35; // default line height
15
+ --text-wrap: pretty; // default
16
+ --letter-spacing: normal; // 0.01em etc - match figma
17
+ --type-margin: 15pxv; // Bottom spacing under type elements todo: replace with spacing var
11
18
  }
12
19
 
13
- // edit me
14
- :root {
15
- // --font-family-system: '<project font>';
16
- // --font-family-heading: if headings use different font;
20
+ // Toggle fluid-type in 00-sass/variables
21
+ @if $enable-fluid-type {
22
+ @include fluid-type;
17
23
  }
18
24
 
19
25
  // Set top level rules
@@ -36,7 +42,11 @@ html {
36
42
  }
37
43
 
38
44
  // Make code look like code
39
- code, kbd, samp, pre, tt {
45
+ code,
46
+ kbd,
47
+ samp,
48
+ pre,
49
+ tt {
40
50
  font-family: var(--font-family-monospace);
41
51
  }
42
52
 
@@ -65,19 +75,19 @@ code, kbd, samp, pre, tt {
65
75
  line-height: 1.2; // edit me
66
76
  }
67
77
 
68
- .heading--xl {
78
+ .heading--xl {
69
79
  @include type-scale(heading-xl);
70
80
 
71
81
  --font-min-clamp: 28px;
72
82
  }
73
83
 
74
- .heading--l {
84
+ .heading--l {
75
85
  @include type-scale(heading-l);
76
86
 
77
87
  --font-min-clamp: 24px;
78
88
  }
79
89
 
80
- .heading--m {
90
+ .heading--m {
81
91
  @include type-scale(heading-m);
82
92
 
83
93
  --font-min-clamp: 20px;
@@ -101,9 +111,13 @@ code, kbd, samp, pre, tt {
101
111
  --font-min-clamp: 14px;
102
112
  }
103
113
 
104
- .body--m { @include type-scale(body-m); }
114
+ .body--m {
115
+ @include type-scale(body-m);
116
+ }
105
117
 
106
- .body--s { @include type-scale(body-s);}
118
+ .body--s {
119
+ @include type-scale(body-s);
120
+ }
107
121
 
108
122
  .body--xs {
109
123
  @include type-scale(body-xs);
@@ -155,4 +169,4 @@ code, kbd, samp, pre, tt {
155
169
 
156
170
  .text-right {
157
171
  text-align: right;
158
- }
172
+ }
@@ -1,4 +1,4 @@
1
- @use "../../00-config" as *;
1
+ @use "../../00-sass" as *;
2
2
 
3
3
  .color {
4
4
  &--white {
@@ -1,4 +1,4 @@
1
- @use '../../00-config' as *;
1
+ @use '../../00-sass' as *;
2
2
 
3
3
  .flex {
4
4
  display: flex;
package/scss/styles.scss CHANGED
@@ -1,3 +1,3 @@
1
- @use './00-config' as *;
1
+ @use './00-sass' as *;
2
2
  @use './01-base' as *;
3
3
  @use './02-components' as *;
package/test/styles.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  // @use '../scss/site' as *;
2
- @use '../scss/00-config' as *;
2
+ @use '../scss/00-sass' as *;
3
3
  @use '../scss/01-base' as *;
4
4
  @use '../scss/02-components' as *;
5
5
  @use '../scss/03-modules' as *;
@@ -1,21 +0,0 @@
1
- // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
2
- // 📜 Primitives
3
- // System-level "physics" of the design system — how scaling, pxv units,
4
- // and fluid typography behave under the hood. You normally don’t edit this.
5
- // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
6
-
7
- // 🧩 Breakpoints for Sassy mqs - see mixins
8
- // -----------------------------------------------------------------------------
9
- $ms: 320 !default; // Mobile small
10
- $mm: 375 !default; // Mobile medium
11
- $ml: 500 !default; // Mobile large
12
- $ts: 600 !default; // Tablet small
13
- $tm: 768 !default; // Tablet medium
14
- $tl: 1024 !default; // Tablet large
15
- $dxs: $tl !default; // Desktop x-small
16
- $ds: 1280 !default; // Desktop small
17
- $dm: 1440 !default; // Desktop medium
18
- $dl: 1600 !default; // Desktop large
19
- $dxl: 1800 !default; // Desktop x-large
20
-
21
- $type-scale-breakpoint: $tm !default;
@@ -1,16 +0,0 @@
1
- :root {
2
- // defaults
3
- --easing: cubic-bezier(0.23, 1, 0.32, 1); // Michael Jordan Magic Johnson
4
- --border-radius: 5pxv;
5
-
6
- // default type settings
7
- --font-min-clamp: 11px; // default min-size for all type
8
- --line-height: 1.5; // default line height
9
- --text-wrap: pretty; // default
10
- --letter-spacing: normal; // 0.01em etc - match figma
11
- --type-margin: 15pxv; // Bottom spacing under type elements todo: replace with spacing var
12
-
13
- // container settings:
14
- --container-size: 1280pxv;
15
- --mobile-gutters: 5%;
16
- }
File without changes