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 +1 -1
- package/readme.md +7 -8
- package/scss/{00-config → 00-sass}/_index.scss +1 -2
- package/scss/{00-config → 00-sass}/_mixins.scss +1 -2
- package/scss/{00-config/_settings.scss → 00-sass/_variables.scss} +23 -7
- package/scss/01-base/_index.scss +2 -2
- package/scss/01-base/_layout.scss +20 -8
- package/scss/01-base/_motion.scss +8 -0
- package/scss/01-base/{_primitives.scss → _scaling.scss} +10 -17
- package/scss/01-base/_typography.scss +29 -15
- package/scss/01-base/utilities/_display.scss +1 -1
- package/scss/01-base/utilities/_flex.scss +1 -1
- package/scss/styles.scss +1 -1
- package/test/styles.scss +1 -1
- package/scss/00-config/_primitives.scss +0 -21
- package/scss/01-base/_settings.scss +0 -16
- /package/scss/{00-config → 00-sass}/_functions.scss +0 -0
package/package.json
CHANGED
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-
|
|
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-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
|
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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
2
|
-
// ⚙️
|
|
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:
|
|
25
|
-
body-m:
|
|
26
|
-
body-s:
|
|
27
|
-
body-xs:
|
|
28
|
-
body-xxs:
|
|
29
|
-
body-xxxs:
|
|
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
|
+
|
package/scss/01-base/_index.scss
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
@use '../00-
|
|
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
|
-
//
|
|
15
|
+
// Responsive Engine
|
|
4
16
|
// -----------------------------------------------------------------------------
|
|
5
|
-
// This is our magic "it just works" responsive
|
|
6
|
-
// ways to set up a primary container.
|
|
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-
|
|
1
|
+
@use '../00-sass' as *;
|
|
2
2
|
|
|
3
3
|
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
4
|
-
//
|
|
5
|
-
//
|
|
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;
|
|
20
|
-
--desktop-basis-h: 750;
|
|
21
|
-
--desktop-min: 768;
|
|
22
|
-
--desktop-max: 2000;
|
|
23
|
-
--desktop-squish:
|
|
24
|
-
--desktop-floor: 500;
|
|
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-
|
|
1
|
+
@use '../00-sass' as *;
|
|
2
2
|
|
|
3
3
|
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
4
4
|
// 📄 _typography.scss
|
|
5
5
|
// Type system + custom styles
|
|
6
6
|
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
7
7
|
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
//
|
|
14
|
-
|
|
15
|
-
|
|
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,
|
|
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 {
|
|
114
|
+
.body--m {
|
|
115
|
+
@include type-scale(body-m);
|
|
116
|
+
}
|
|
105
117
|
|
|
106
|
-
.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
|
+
}
|
package/scss/styles.scss
CHANGED
package/test/styles.scss
CHANGED
|
@@ -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
|