kni-cascade 1.0.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.
@@ -0,0 +1,99 @@
1
+ @use '../00-config' as *;
2
+
3
+ // 🧩 Responsive Engine
4
+ // -----------------------------------------------------------------------------
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
7
+ // |--------------------|-------------------------------------------|-----------
8
+ // | Mobile (375) | Desktop (1440) | No scale
9
+ // |--------------------|-------------------------------------------|-----------
10
+ // | min:320 max:767 | min:768 max:1800 |
11
+ // |--------------------|-------------------------------------------|-----------
12
+
13
+ // kill the wp-admin bar
14
+
15
+ @include wp-admin-bar;
16
+
17
+ // Primary Media Query
18
+ @media (width >= 768px) {
19
+ :root {
20
+ --site-min: var(--desktop-min);
21
+ --site-basis: var(--desktop-basis);
22
+ --site-max: var(--desktop-max);
23
+ }
24
+ }
25
+
26
+ body {
27
+ min-height: 100vh;
28
+ }
29
+
30
+ .container {
31
+ width: 100%;
32
+ margin: 0 auto;
33
+
34
+ @include lg {
35
+ max-width: var(--container-size);
36
+ }
37
+
38
+ @include sm {
39
+ padding-left: var(--mobile-gutters);
40
+ padding-right: var(--mobile-gutters);
41
+ }
42
+ }
43
+
44
+ .desktop-only {
45
+ @include lg {
46
+ display: none;
47
+ }
48
+ }
49
+
50
+ .mobile-only {
51
+ @include sm {
52
+ display: none;
53
+ }
54
+ }
55
+
56
+ #breakpoints {
57
+ display: none;
58
+ position: relative;
59
+ z-index: 2;
60
+
61
+ @include sm {
62
+ z-index: 1;
63
+ }
64
+ }
65
+
66
+ .absolute {
67
+ position: absolute;
68
+ }
69
+
70
+ .relative {
71
+ position: relative;
72
+ }
73
+
74
+ .abs-full {
75
+ @include abs-full;
76
+ }
77
+
78
+ .fit-photo {
79
+ position: relative;
80
+
81
+ &.absolute {
82
+ position: absolute;
83
+ }
84
+
85
+ > img,
86
+ > video {
87
+ @include abs-full;
88
+ }
89
+
90
+ &.cover > img,
91
+ &.cover > video {
92
+ object-fit: cover;
93
+ }
94
+
95
+ &.contain > img,
96
+ &.contain > video {
97
+ object-fit: contain;
98
+ }
99
+ }
@@ -0,0 +1,83 @@
1
+ // β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘
2
+ // πŸ“„ _reset.scss
3
+ // Fix all the browser inconsistencies and provide a clean slate
4
+ // modified from https://piccalil.li/blog/a-modern-css-reset
5
+ // β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘
6
+
7
+ // Box sizing rules - how is this not native yet?
8
+ *,
9
+ *::before,
10
+ *::after {
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ html {
15
+ // Preven font size inflation on mobile
16
+ text-size-adjust: none;
17
+
18
+ // Normalize text rendering
19
+ -webkit-font-smoothing: antialiased;
20
+ -webkit-overflow-scrolling: touch;
21
+ }
22
+
23
+ // Set core root defaults
24
+ html:focus-within {
25
+ scroll-behavior: smooth;
26
+ }
27
+
28
+ // Remove default margin
29
+ :where(body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) {
30
+ margin: 0;
31
+ }
32
+
33
+ // Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed
34
+ :where(ul[role='list'], ol[role='list']) {
35
+ list-style: none;
36
+ }
37
+
38
+ // A elements that don't have a class get default styles
39
+ :where(a:not([class])) {
40
+ text-decoration-skip-ink: auto;
41
+ }
42
+
43
+ // Make images easier to work with
44
+ img,
45
+ picture {
46
+ max-width: 100%;
47
+ display: block;
48
+ }
49
+
50
+ // Inherit fonts for inputs and buttons
51
+ input,
52
+ button,
53
+ textarea,
54
+ select,
55
+ fieldset,
56
+ legend {
57
+ font: inherit;
58
+ }
59
+
60
+ // make hr not ugly
61
+ hr {
62
+ block-size: 1px;
63
+ inline-size: 100%;
64
+ border: none;
65
+ background-color: currentcolor;
66
+ margin-block: var(--type-margin); // todo: remove var?
67
+ }
68
+
69
+ // Remove all animations, transitions and smooth scroll for people that prefer not to see them
70
+ @media (prefers-reduced-motion: reduce) {
71
+ html:focus-within {
72
+ scroll-behavior: auto;
73
+ }
74
+
75
+ *,
76
+ *::before,
77
+ *::after {
78
+ animation-duration: 0.01ms !important;
79
+ animation-iteration-count: 1 !important;
80
+ transition-duration: 0.01ms !important;
81
+ scroll-behavior: auto !important;
82
+ }
83
+ }
@@ -0,0 +1,151 @@
1
+ @use '../00-config' as *;
2
+
3
+ // β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘
4
+ // πŸ“„ _typography.scss
5
+ // Type system + custom styles
6
+ // β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘
7
+
8
+ // Toggle fluid-type in settings.scss
9
+ @if $enable-fluid-type {
10
+ @include fluid-type;
11
+ }
12
+
13
+ // Set top level rules
14
+ html {
15
+ font-family: var(--font-family-system); // edit me
16
+ line-height: var(--line-height);
17
+ letter-spacing: var(--letter-spacing);
18
+ text-wrap: var(--text-wrap);
19
+ }
20
+
21
+ // Rules for all text elements
22
+ :where(p, h1, h2, h3, h4, h5, h6, ul, ol, dl, blockquote, pre, figure) {
23
+ margin-block-end: var(--type-margin);
24
+ }
25
+
26
+ // Heading specific styles
27
+ :where(h1, h2, h3, h4, h5, h6) {
28
+ line-height: 1.2;
29
+ }
30
+
31
+ // Make code look like code
32
+ code, kbd, samp, pre, tt {
33
+ font-family: var(--font-family-monospace);
34
+ }
35
+
36
+ // Open up lineheight for longform reading
37
+ .longform {
38
+ line-height: 1.5;
39
+ }
40
+
41
+ .caps {
42
+ text-transform: uppercase;
43
+ font-weight: bold;
44
+ letter-spacing: 0.2em;
45
+ }
46
+
47
+ // Typography classes correspond directly to design tokens in $type-scale.
48
+ // Each class sets responsive font size via @include type-scale() and
49
+ // can be safely overridden per component without side effects.
50
+
51
+ .heading--xxl {
52
+ @include type-scale(heading-xxl);
53
+
54
+ // // note you can do overwrites here
55
+ // --font-min-clamp: 52px;
56
+ // --font-max-clamp: 68px;
57
+
58
+ line-height: 1.2; // edit me
59
+ }
60
+
61
+ .heading--xl {
62
+ @include type-scale(heading-xl);
63
+
64
+ --font-min-clamp: 28px;
65
+ }
66
+
67
+ .heading--l {
68
+ @include type-scale(heading-l);
69
+
70
+ --font-min-clamp: 24px;
71
+ }
72
+
73
+ .heading--m {
74
+ @include type-scale(heading-m);
75
+
76
+ --font-min-clamp: 20px;
77
+ }
78
+
79
+ .heading--s {
80
+ @include type-scale(heading-s);
81
+
82
+ --font-min-clamp: 18px;
83
+ }
84
+
85
+ .heading--xs {
86
+ @include type-scale(heading-xs);
87
+
88
+ --font-min-clamp: 16px;
89
+ }
90
+
91
+ .body--l {
92
+ @include type-scale(body-l);
93
+
94
+ --font-min-clamp: 14px;
95
+ }
96
+
97
+ .body--m { @include type-scale(body-m); }
98
+
99
+ .body--s { @include type-scale(body-s);}
100
+
101
+ .body--xs {
102
+ @include type-scale(body-xs);
103
+ }
104
+
105
+ .body--xxs {
106
+ @include type-scale(body-xxs);
107
+ }
108
+
109
+ .body--xxxs {
110
+ @include type-scale(body-xxxs);
111
+ }
112
+
113
+ .w--300 {
114
+ font-weight: 300;
115
+ }
116
+
117
+ .w--400 {
118
+ font-weight: 400;
119
+ }
120
+
121
+ .w--500 {
122
+ font-weight: 500;
123
+ }
124
+
125
+ .w--600 {
126
+ font-weight: 600;
127
+ }
128
+
129
+ .w--700 {
130
+ font-weight: 700;
131
+ }
132
+
133
+ .w--800 {
134
+ font-weight: 800;
135
+ }
136
+
137
+ .wrap-pretty {
138
+ text-wrap: pretty;
139
+ }
140
+
141
+ .wrap-balance {
142
+ text-wrap: balance;
143
+ }
144
+
145
+ .text-center {
146
+ text-align: center;
147
+ }
148
+
149
+ .text-right {
150
+ text-align: right;
151
+ }
File without changes
@@ -0,0 +1,22 @@
1
+ $white: #fff;
2
+ $black: #000;
3
+
4
+ .color {
5
+ &--white {
6
+ color: $white;
7
+ }
8
+
9
+ &--black {
10
+ color: $black;
11
+ }
12
+ }
13
+
14
+ .background {
15
+ &--white {
16
+ color: $white;
17
+ }
18
+
19
+ &--black {
20
+ color: $black;
21
+ }
22
+ }
@@ -0,0 +1,124 @@
1
+ @use '../../00-config' as *;
2
+
3
+ .flex {
4
+ display: flex;
5
+
6
+ &.wrap {
7
+ flex-wrap: wrap;
8
+ }
9
+
10
+ &.wrap-mobile {
11
+ @include sm {
12
+ flex-wrap: wrap;
13
+ }
14
+ }
15
+
16
+ &.inline {
17
+ display: inline-flex;
18
+ }
19
+
20
+ &.inline-mobile {
21
+ @include sm {
22
+ display: inline-flex;
23
+ }
24
+ }
25
+
26
+ &.center {
27
+ align-items: center;
28
+ justify-content: center;
29
+ }
30
+
31
+ &.j-sb {
32
+ justify-content: space-between;
33
+ }
34
+
35
+ &.j-c {
36
+ justify-content: center;
37
+ }
38
+
39
+ &.j-start {
40
+ justify-content: flex-start;
41
+ }
42
+
43
+ &.j-end {
44
+ justify-content: flex-end;
45
+ }
46
+
47
+ &.a-c {
48
+ align-items: center;
49
+ }
50
+
51
+ &.a-start {
52
+ align-items: flex-start;
53
+ }
54
+
55
+ &.a-baseline {
56
+ align-items: baseline;
57
+ }
58
+
59
+ &.a-end {
60
+ align-items: flex-end;
61
+ }
62
+
63
+ &.column {
64
+ flex-direction: column;
65
+ }
66
+
67
+ &.column-desktop {
68
+ @include lg {
69
+ flex-direction: column;
70
+ }
71
+ }
72
+
73
+ &.column-mobile {
74
+ @include sm {
75
+ flex-direction: column;
76
+ }
77
+ }
78
+
79
+ &.column-mobile-reverse {
80
+ @include sm {
81
+ flex-direction: column-reverse;
82
+ }
83
+ }
84
+
85
+ &.row-reverse {
86
+ flex-direction: row-reverse;
87
+ }
88
+
89
+ &.row-reverse-desktop {
90
+ @include lg {
91
+ flex-direction: row-reverse;
92
+ }
93
+ }
94
+
95
+ &.a-c-desktop {
96
+ @include lg {
97
+ align-items: center;
98
+ }
99
+ }
100
+
101
+ &.a-start-desktop {
102
+ @include lg {
103
+ align-items: flex-start;
104
+ }
105
+ }
106
+
107
+ &.j-c-desktop {
108
+ @include lg {
109
+ justify-content: center;
110
+ }
111
+ }
112
+
113
+ &.j-sb-desktop {
114
+ @include lg {
115
+ justify-content: space-between;
116
+ }
117
+ }
118
+
119
+ &.j-end-desktop {
120
+ @include lg {
121
+ justify-content: flex-end;
122
+ }
123
+ }
124
+ }
@@ -0,0 +1,6 @@
1
+ @forward 'dev';
2
+ @forward 'display';
3
+ @forward 'flex';
4
+ @forward 'spacing';
5
+
6
+ /* i'm utitlities */
File without changes
@@ -0,0 +1 @@
1
+ /* this is components index */
@@ -0,0 +1 @@
1
+ /* this is modules index */
@@ -0,0 +1 @@
1
+ /* this is pages index */
@@ -0,0 +1,5 @@
1
+ @use './00-config' as *;
2
+ @use './01-base' as *;
3
+ @use './02-components' as *;
4
+ @use './03-modules' as *;
5
+ @use './04-pages' as *;
@@ -0,0 +1,116 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <link rel="icon" type="image/ico" href="https://www.kurtnoble.com/img/favicon.ico" />
5
+ <meta charset="utf-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>KNI CSS</title>
8
+ <link rel="stylesheet" href="styles.css" />
9
+ </head>
10
+
11
+ <body class="test">
12
+ <div class="container">
13
+ <div id="width">
14
+ <span class="bp"></span>
15
+ <span class="currentWidth"></span>
16
+ </div>
17
+ <script>
18
+ const width = document.querySelector('#width span.currentWidth');
19
+
20
+ window.onload = function () {
21
+ width.innerHTML = window.innerWidth;
22
+ };
23
+ window.onresize = function () {
24
+ width.innerHTML = window.innerWidth;
25
+ };
26
+ </script>
27
+
28
+ <h1 class="heading--xxl">KNI-Cascade</h1>
29
+ <p>This is <a href="https://github.com/kni-labs/kni-cascade">how we CSS.</a></p>
30
+ <div class="box">I'm a cool box</div>
31
+ <main>
32
+ <section id="typography">
33
+ <h4>Typography</h4>
34
+ <hr />
35
+ <br />
36
+ <h1 class="heading--xxl">Fluid grids jump quickly when pixel boundaries fade</h1>
37
+ <p>here's a paragraph</p>
38
+ <h2 class="heading--xl">Bold layers of type mix sharp quartz and new glyphs</h2>
39
+ <p>here's a paragraph</p>
40
+ <h3 class="heading--l">Jazzy mockups bring quirky UX flow and crisp detail</h3>
41
+ <p>here's a paragraph</p>
42
+ <h4 class="heading--m">Quick designers juggle hazy fonts, warm color, and depth</h4>
43
+ <p>here's a paragraph</p>
44
+ <h5 class="heading--s">Twelve bright panels form a just-in-time CSS layout</h5>
45
+ <p>here's a paragraph</p>
46
+ <h6 class="heading--xs">Dynamic boxes flex through jumpy scroll and radiant hue</h6>
47
+ <p class="body-l">
48
+ Alex, Brianna, Charlie, Danielle, Elijah, Fiona, Gabriel, Harper, Isaac, Jasmine, Kieran, Lillian, Mateo,
49
+ Nadia, Oliver, Penelope, Quinn, Rafael, Sophia, Tristan, Ursula, Victor, Willow, Xavier, Yasmine, and Zachary
50
+ gathered in the quirky old library, flipping through dusty books while exchanging jokes.
51
+ </p>
52
+ <p class="body--l longform">
53
+ From the highest shelf, an ancient volume tumbled, making Jasmine yelp and Quinn laugh. β€œUnexpected surprises
54
+ keep things exciting!” Xavier quipped, adjusting his glasses, amazed by the bizarre discovery.
55
+ </p>
56
+ <p class="body--m">
57
+ The efficient officer shuffled swiftly through the artificial lights, affixing a final note to the affable
58
+ florist’s door. He studied an old encyclopΓ¦dia and an Ε“uvre on mediΓ¦val craftsmanship while enjoying a hors
59
+ d’œuvre on the café’s terrace in the straße
60
+ </p>
61
+ <p class="body--m longform">
62
+ AVoid wavy kerning! Typographers often fix TA, WA, To, and VA pairs while refining β€˜tight’ and β€˜loose’ spaces.
63
+ β€œIt’s tricky!” Xavier joked, adjusting 7.9Β° of alignment.
64
+ </p>
65
+ <p class="body--s">
66
+ Mapping Cellular Networks for Microbiome Contributions to Neurodegeneration. The gut microbiome is
67
+ increasingly implicated in neurodegenerative diseases, with links to amyloid pathology, microglial activation,
68
+ neurodegeneration, motor impairments and cognitive decline in animal models. However, molecular and cellular
69
+ mechanisms underlying how the gut microbiota influences core symptoms of neurodegenerative disease remain
70
+ undefined.
71
+ </p>
72
+ <p class="body--xs">
73
+ Mapping Cellular Networks for Microbiome Contributions to Neurodegeneration. The gut microbiome is
74
+ increasingly implicated in neurodegenerative diseases, with links to amyloid pathology, microglial activation,
75
+ neurodegeneration, motor impairments and cognitive decline in animal models. However, molecular and cellular
76
+ mechanisms underlying how the gut microbiota influences core symptoms of neurodegenerative disease remain
77
+ undefined.
78
+ </p>
79
+ <p class="body--xxs">
80
+ Mapping Cellular Networks for Microbiome Contributions to Neurodegeneration. The gut microbiome is
81
+ increasingly implicated in neurodegenerative diseases, with links to amyloid pathology, microglial activation,
82
+ neurodegeneration, motor impairments and cognitive decline in animal models. However, molecular and cellular
83
+ mechanisms underlying how the gut microbiota influences core symptoms of neurodegenerative disease remain
84
+ undefined.
85
+ </p>
86
+ <p class="body--xxxs">
87
+ Mapping Cellular Networks for Microbiome Contributions to Neurodegeneration. The gut microbiome is
88
+ increasingly implicated in neurodegenerative diseases, with links to amyloid pathology, microglial activation,
89
+ neurodegeneration, motor impairments and cognitive decline in animal models. However, molecular and cellular
90
+ mechanisms underlying how the gut microbiota influences core symptoms of neurodegenerative disease remain
91
+ undefined.
92
+ </p>
93
+ <div class=" color-test body--s">
94
+ <p>asdfasdf</p>
95
+ <ul>
96
+ <li>asdfasdf</li>
97
+ </ul>
98
+ </div>
99
+ <p class="body--l caps">Harvard medical school</p>
100
+ <p class="body--m caps">Harvard medical school</p>
101
+ <p class="body--s caps">Harvard medical school</p>
102
+ <p class="body--xs caps">Harvard medical school</p>
103
+ <p class="body--xxs caps">Harvard medical school</p>
104
+ <p class="body--xxs caps">Harvard medical school</p>
105
+ <div>
106
+ <pre><code>this is some code</code></pre>
107
+ </div>
108
+ <button>i'm a button</button>
109
+
110
+ <div class="negative">i have a negative margin</div>
111
+ <div id="dev-config--width"></div>
112
+ </section>
113
+ </main>
114
+ </div>
115
+ </body>
116
+ </html>