kni-cascade 1.1.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 +15 -15
- package/scss/00-sass/_functions.scss +3 -0
- package/scss/00-sass/_index.scss +11 -0
- package/scss/{00-config → 00-sass}/_mixins.scss +6 -3
- package/scss/{00-config/_settings.scss → 00-sass/_variables.scss} +24 -21
- package/scss/01-base/_index.scss +2 -0
- package/scss/01-base/_layout.scss +20 -8
- package/scss/01-base/_motion.scss +8 -0
- package/scss/{00-config/_primitives.scss → 01-base/_scaling.scss} +10 -33
- package/scss/01-base/_typography.scss +29 -15
- package/scss/01-base/utilities/_display.scss +1 -2
- package/scss/01-base/utilities/_flex.scss +1 -1
- package/scss/01-base/utilities/_index.scss +1 -1
- package/scss/04-pages/_index.scss +9 -1
- package/scss/styles.scss +1 -3
- package/test/styles.scss +1 -1
- package/scss/00-config/_functions.scss +0 -0
- package/scss/00-config/_index.scss +0 -4
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,12 +51,12 @@ 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
|
-
├── 02-components/ #
|
|
57
|
-
├── 03-modules/ #
|
|
58
|
-
├── 04-pages/ #
|
|
59
|
-
└── styles.scss
|
|
56
|
+
├── 02-components/ # Globally-available UI elements (header, footer, buttons, etc.)
|
|
57
|
+
├── 03-modules/ # Page body building blocks
|
|
58
|
+
├── 04-pages/ # Template- and page-specific styles, intended to imported only into the relevant file
|
|
59
|
+
└── styles.scss # Public entry file for global CSS build
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
---
|
|
@@ -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,8 @@ By default, **Gulp** runs:
|
|
|
119
118
|
|
|
120
119
|
## 🪄 Quick Philosophy
|
|
121
120
|
|
|
122
|
-
>
|
|
123
|
-
> If it’s
|
|
124
|
-
> If it’s
|
|
125
|
-
>
|
|
121
|
+
> If it defines how the system works is a Sass function, mixin or variable, it lives in sass.
|
|
122
|
+
> If it’s a globally-used reset, type, or layout rule, it lives in base.
|
|
123
|
+
> If it’s a globally-used element, it lives in components.
|
|
124
|
+
> If it's a page body building block, it lives in modules.
|
|
125
|
+
> If it’s page-specific, it lives in pages.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
2
|
+
// ‼️ This directory is reserved for all SCSS functions, mixins and variables.
|
|
3
|
+
// It should not contain any CSS that gets generated, as the intention of it
|
|
4
|
+
// is to provide a clean and importable file that can be used across the
|
|
5
|
+
// project to provide access to shared functions, mixins and variables
|
|
6
|
+
// without generating any CSS.
|
|
7
|
+
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
8
|
+
|
|
9
|
+
@forward 'variables';
|
|
10
|
+
@forward 'functions';
|
|
11
|
+
@forward 'mixins';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
@use 'settings' as *;
|
|
2
|
-
@use 'primitives' as *;
|
|
3
1
|
@use "sass:map";
|
|
2
|
+
@use "./variables" as *;
|
|
3
|
+
|
|
4
|
+
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
5
|
+
// 🎨 Mixins
|
|
6
|
+
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
4
7
|
|
|
5
8
|
// Powers all type-sizing - see settings map
|
|
6
9
|
@mixin type-scale($token, $mq: $type-scale-breakpoint) {
|
|
@@ -109,4 +112,4 @@
|
|
|
109
112
|
transform: none !important;
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
|
-
}
|
|
115
|
+
}
|
|
@@ -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,27 +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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
--border-radius: 5pxv;
|
|
32
|
+
// Colors
|
|
33
|
+
$white: #fff;
|
|
34
|
+
$black: #000;
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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;
|
|
43
50
|
|
|
44
|
-
// container settings:
|
|
45
|
-
--container-size: 1280pxv;
|
|
46
|
-
--mobile-gutters: 5%;
|
|
47
|
-
}
|
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,27 +1,10 @@
|
|
|
1
|
-
@use '
|
|
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
|
-
// 🧩 Breakpoints for Sassy mqs - see mixins
|
|
10
|
-
// -----------------------------------------------------------------------------
|
|
11
|
-
$ms: 320 !default; // Mobile small
|
|
12
|
-
$mm: 375 !default; // Mobile medium
|
|
13
|
-
$ml: 500 !default; // Mobile large
|
|
14
|
-
$ts: 600 !default; // Tablet small
|
|
15
|
-
$tm: 768 !default; // Tablet medium
|
|
16
|
-
$tl: 1024 !default; // Tablet large
|
|
17
|
-
$dxs: $tl !default; // Desktop x-small
|
|
18
|
-
$ds: 1280 !default; // Desktop small
|
|
19
|
-
$dm: 1440 !default; // Desktop medium
|
|
20
|
-
$dl: 1600 !default; // Desktop large
|
|
21
|
-
$dxl: 1800 !default; // Desktop x-large
|
|
22
|
-
|
|
23
|
-
$type-scale-breakpoint: $tm !default;
|
|
24
|
-
|
|
25
8
|
:root {
|
|
26
9
|
// mobile defaults
|
|
27
10
|
--mobile-basis-w: 375;
|
|
@@ -32,12 +15,12 @@ $type-scale-breakpoint: $tm !default;
|
|
|
32
15
|
--mobile-squish:0;
|
|
33
16
|
|
|
34
17
|
// Desktop defaults
|
|
35
|
-
--desktop-basis-w: 1440;
|
|
36
|
-
--desktop-basis-h: 750;
|
|
37
|
-
--desktop-min: 768;
|
|
38
|
-
--desktop-max: 2000;
|
|
39
|
-
--desktop-squish:
|
|
40
|
-
--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
|
|
41
24
|
|
|
42
25
|
// default to mobile sizing
|
|
43
26
|
--active-basis-w: var(--mobile-basis-w);
|
|
@@ -53,7 +36,6 @@ $type-scale-breakpoint: $tm !default;
|
|
|
53
36
|
// safe vh used in pxv calculations
|
|
54
37
|
--safe-vh: max(1vh, 1px * var(--active-floor) / 100);
|
|
55
38
|
|
|
56
|
-
|
|
57
39
|
// pxv unit -
|
|
58
40
|
/* stylelint-disable */
|
|
59
41
|
@if $enable-pxv {
|
|
@@ -69,9 +51,4 @@ $type-scale-breakpoint: $tm !default;
|
|
|
69
51
|
// Fluid type primitives
|
|
70
52
|
--font-max-clamp: 9999px; // no touch
|
|
71
53
|
--font-size: 16pxv; // fluid-type base font size
|
|
72
|
-
|
|
73
|
-
// system font stacks
|
|
74
|
-
--font-family-system: system-ui, helvetica,arial, sans-serif;
|
|
75
|
-
--font-family-heading: var(--font-family-system);
|
|
76
|
-
--font-family-monospace: ui-monospace, sfmono-regular, menlo, monaco, consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
77
|
-
}
|
|
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
|
+
}
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
|
2
|
+
// ‼️ This directory is reserved for page- and template-level stylesheets. It
|
|
3
|
+
// should not be used to combine stylesheets into a single file, as the purpose
|
|
4
|
+
// of scoping styles to specific pages or templates is to optimize by allowing
|
|
5
|
+
// them to be loaded only when needed.
|
|
6
|
+
// Files in this directory should typically start with the following line to
|
|
7
|
+
// access functions, mixins and variables from the global Sass config.
|
|
8
|
+
// @use '../00-config' as *;
|
|
9
|
+
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
|
package/scss/styles.scss
CHANGED
package/test/styles.scss
CHANGED
|
File without changes
|