nk_jtb 0.9.8 → 0.9.10
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/index.html +35 -31
- package/package.json +1 -1
- package/src/_nk.scss +19 -1
- package/src/base/_base.scss +5 -3
- package/src/base/_content_gap.scss +0 -5
- package/src/color/_themes.scss +7 -7
- package/src/components/_button.scss +4 -4
- package/src/components/_list.scss +2 -2
- package/src/components-extended/_hero.scss +1 -1
- package/src/functions/_colorFunctions.scss +4 -4
- package/src/functions/_mapMerge.scss +2 -2
- package/src/mixins/_class-helpers.scss +7 -7
- package/src/mixins/_classGenerators.scss +2 -2
- package/src/mixins/_colorThemeGenerators.scss +4 -4
- package/src/mixins/_magicClassGenerators.scss +4 -4
- package/src/mixins/_media.scss +3 -3
- package/src/mixins/generators/_generate-classes.scss +2 -2
- package/src/mixins/generators/_generate-from-values.scss +3 -3
- package/src/utilities/_grid.scss +30 -26
- package/src/utilities/_sizing.scss +6 -6
- package/src/utilities/_state.scss +4 -4
- package/src/utilities/_typography.scss +6 -6
- package/src/variables/_base.scss +3 -5
- package/src/variables/_components.scss +4 -4
- package/src/variables/_utility_maps.scss +10 -10
package/index.html
CHANGED
|
@@ -12,6 +12,39 @@
|
|
|
12
12
|
|
|
13
13
|
<body">
|
|
14
14
|
<div class="quick-hide-div zebra">
|
|
15
|
+
<section id="typography" class="py-3">
|
|
16
|
+
<div class="container">
|
|
17
|
+
<h2 class="title mb-3">Typography</h2>
|
|
18
|
+
<div class="grid-3 cols-2">
|
|
19
|
+
<div id="headings">
|
|
20
|
+
<h1>Heading 1</h1>
|
|
21
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
22
|
+
<h2>Heading 2</h2>
|
|
23
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
24
|
+
<h3>Heading 3</h3>
|
|
25
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
26
|
+
<h4>Heading 4</h4>
|
|
27
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
28
|
+
<h5>Heading 5</h5>
|
|
29
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
30
|
+
<h6>Heading 6</h6>
|
|
31
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
32
|
+
</div>
|
|
33
|
+
<div>
|
|
34
|
+
<p class="lead">Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellendus sed aperiam quibusdam adipisci sequi deserunt nesciunt vel illum voluptatibus maxime soluta repudiandae numquam sapiente exercitationem, culpa, omnis expedita tempore? Similique.</p>
|
|
35
|
+
|
|
36
|
+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Cumque at corporis deserunt sint eum laboriosam quae nulla fugit, error, tempore quibusdam temporibus fuga adipisci. Nam architecto sunt cupiditate soluta molestias ipsum delectus numquam illo magnam! Praesentium quos deserunt sed, maxime, eligendi quasi, sequi fugiat facere neque harum debitis laborum ipsam!</p>
|
|
37
|
+
|
|
38
|
+
<h3 class="title">Text Sizes</h3>
|
|
39
|
+
<p class="txt-xs">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Architecto delectus asperiores commodi incidunt facilis nisi adipisci magni assumenda ullam exercitationem id similique dolore at reiciendis impedit suscipit, soluta ratione nam deleniti non magnam et repudiandae, aliquam fugit? Eum, expedita officia!</p>
|
|
40
|
+
<p class="txt-sm">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Architecto delectus asperiores commodi incidunt facilis nisi adipisci magni assumenda ullam exercitationem id similique dolore at reiciendis impedit suscipit, soluta ratione nam deleniti non magnam et repudiandae, aliquam fugit? Eum, expedita officia!</p>
|
|
41
|
+
<p class="txt-base">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Architecto delectus asperiores commodi incidunt facilis nisi adipisci magni assumenda ullam exercitationem id similique dolore at reiciendis impedit suscipit, soluta ratione nam deleniti non magnam et repudiandae, aliquam fugit? Eum, expedita officia!</p>
|
|
42
|
+
<p class="txt-lg">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Architecto delectus asperiores commodi incidunt facilis nisi adipisci magni assumenda ullam exercitationem id similique dolore at reiciendis impedit suscipit, soluta ratione nam deleniti non magnam et repudiandae, aliquam fugit? Eum, expedita officia!</p>
|
|
43
|
+
<p class="txt-xl">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Architecto delectus asperiores commodi incidunt facilis nisi adipisci magni assumenda ullam exercitationem id similique dolore at reiciendis impedit suscipit, soluta ratione nam deleniti non magnam et repudiandae, aliquam fugit? Eum, expedita officia!</p>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</section>
|
|
15
48
|
<section id="form-controls" class="py-3">
|
|
16
49
|
<div class="container grid cols-2">
|
|
17
50
|
<div id="radio-check-toggle">
|
|
@@ -80,7 +113,7 @@
|
|
|
80
113
|
</div>
|
|
81
114
|
</div>
|
|
82
115
|
</section>
|
|
83
|
-
<section id="
|
|
116
|
+
<section id="notifications" class="py-3">
|
|
84
117
|
<div class="container">
|
|
85
118
|
<div class="grid cols-3">
|
|
86
119
|
<div class="bx pxy-1 flex va-c">
|
|
@@ -97,7 +130,7 @@
|
|
|
97
130
|
</div>
|
|
98
131
|
</div>
|
|
99
132
|
</section>
|
|
100
|
-
<section id="
|
|
133
|
+
<section id="alignment-techniques" class="py-3">
|
|
101
134
|
<div class="container">
|
|
102
135
|
<h2>Alignment Techniques</h2>
|
|
103
136
|
<div class="grid cols-3">
|
|
@@ -424,36 +457,7 @@
|
|
|
424
457
|
</div>
|
|
425
458
|
|
|
426
459
|
<div class="quick-hide-wrapper zebra c-py-5-3-2">
|
|
427
|
-
<section id="typography">
|
|
428
|
-
<div class="container maxw-md">
|
|
429
|
-
<h2 class="title txt-3">Typography</h2>
|
|
430
|
-
|
|
431
|
-
<h1>Heading 1</h1>
|
|
432
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
433
|
-
<h2>Heading 2</h2>
|
|
434
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
435
|
-
<h3>Heading 3</h3>
|
|
436
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
437
|
-
<h4>Heading 4</h4>
|
|
438
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
439
|
-
<h5>Heading 5</h5>
|
|
440
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
441
|
-
<h6>Heading 6</h6>
|
|
442
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae aperiam quas totam laboriosam soluta harum beatae qui reiciendis possimus molestiae?</p>
|
|
443
|
-
|
|
444
|
-
<p class="lead">Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellendus sed aperiam quibusdam adipisci sequi deserunt nesciunt vel illum voluptatibus maxime soluta repudiandae numquam sapiente exercitationem, culpa, omnis expedita tempore? Similique.</p>
|
|
445
460
|
|
|
446
|
-
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Cumque at corporis deserunt sint eum laboriosam quae nulla fugit, error, tempore quibusdam temporibus fuga adipisci. Nam architecto sunt cupiditate soluta molestias ipsum delectus numquam illo magnam! Praesentium quos deserunt sed, maxime, eligendi quasi, sequi fugiat facere neque harum debitis laborum ipsam!</p>
|
|
447
|
-
|
|
448
|
-
<h3 class="title">Text Sizes</h3>
|
|
449
|
-
<p class="txt-xs">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Architecto delectus asperiores commodi incidunt facilis nisi adipisci magni assumenda ullam exercitationem id similique dolore at reiciendis impedit suscipit, soluta ratione nam deleniti non magnam et repudiandae, aliquam fugit? Eum, expedita officia!</p>
|
|
450
|
-
<p class="txt-sm">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Architecto delectus asperiores commodi incidunt facilis nisi adipisci magni assumenda ullam exercitationem id similique dolore at reiciendis impedit suscipit, soluta ratione nam deleniti non magnam et repudiandae, aliquam fugit? Eum, expedita officia!</p>
|
|
451
|
-
<p class="txt-base">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Architecto delectus asperiores commodi incidunt facilis nisi adipisci magni assumenda ullam exercitationem id similique dolore at reiciendis impedit suscipit, soluta ratione nam deleniti non magnam et repudiandae, aliquam fugit? Eum, expedita officia!</p>
|
|
452
|
-
<p class="txt-lg">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Architecto delectus asperiores commodi incidunt facilis nisi adipisci magni assumenda ullam exercitationem id similique dolore at reiciendis impedit suscipit, soluta ratione nam deleniti non magnam et repudiandae, aliquam fugit? Eum, expedita officia!</p>
|
|
453
|
-
<p class="txt-xl">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Architecto delectus asperiores commodi incidunt facilis nisi adipisci magni assumenda ullam exercitationem id similique dolore at reiciendis impedit suscipit, soluta ratione nam deleniti non magnam et repudiandae, aliquam fugit? Eum, expedita officia!</p>
|
|
454
|
-
|
|
455
|
-
</div>
|
|
456
|
-
</section>
|
|
457
461
|
<section id="menu">
|
|
458
462
|
<div class="container">
|
|
459
463
|
<h2 class="title txt-3">Menu Component</h2>
|
package/package.json
CHANGED
package/src/_nk.scss
CHANGED
|
@@ -41,7 +41,7 @@ body {
|
|
|
41
41
|
// -- MARKDOWN --
|
|
42
42
|
// ==========================================================================
|
|
43
43
|
|
|
44
|
-
h2 code{
|
|
44
|
+
h2 code {
|
|
45
45
|
font-size: 0.9em;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -158,3 +158,21 @@ code-first-second-col {
|
|
|
158
158
|
// background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='20px' height='12px' viewBox='0 0 20 12' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg id='Artboard' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' stroke-linecap='square'%3e%3cpath d='M25,1 C20,1 20,11 15,11 C10,11 10,1 5,1 C0,1 0,11 -5,11 C-10,11 -10,1 -15,1' id='Line' stroke='%23CBD5DF' stroke-width='2'%3e%3c/path%3e%3c/g%3e%3c/svg%3e");
|
|
159
159
|
// }
|
|
160
160
|
}
|
|
161
|
+
|
|
162
|
+
.bg-stripes-blue {
|
|
163
|
+
background-color: #60a5fa1a;
|
|
164
|
+
background-image: linear-gradient(135deg, #3b82f680 10%, #0000 0, #0000 50%, #3b82f680 0, #3b82f680 60%, #0000 0, #0000);
|
|
165
|
+
background-size: 7.07px 7.07px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.bg-stripes-pink {
|
|
169
|
+
background-color: #f472b61a;
|
|
170
|
+
background-image: linear-gradient(135deg, #ec489980 10%, #0000 0, #0000 50%, #ec489980 0, #ec489980 60%, #0000 0, #0000);
|
|
171
|
+
background-size: 7.07px 7.07px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.bg-stripes-violet {
|
|
175
|
+
background-color: #a78bfa1a;
|
|
176
|
+
background-image: linear-gradient(135deg, #8b5cf680 10%, #0000 0, #0000 50%, #8b5cf680 0, #8b5cf680 60%, #0000 0, #0000);
|
|
177
|
+
background-size: 7.07px 7.07px;
|
|
178
|
+
}
|
package/src/base/_base.scss
CHANGED
|
@@ -38,7 +38,7 @@ html {
|
|
|
38
38
|
body {
|
|
39
39
|
line-height: inherit; // 1
|
|
40
40
|
color: $text;
|
|
41
|
-
background-color: $
|
|
41
|
+
background-color: $body-bg;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// 1. Add the correct height in Firefox.
|
|
@@ -73,11 +73,13 @@ abbr:where([title]) {
|
|
|
73
73
|
font-weight: $heading-font-weight;
|
|
74
74
|
color: $heading-and-title-color;
|
|
75
75
|
line-height: 1.125;
|
|
76
|
+
text-wrap: balance;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
// add top margin to all headings unless they are
|
|
79
|
+
// add top margin to all headings unless they are H1 or first child. H1 will
|
|
80
|
+
// almost always be first child
|
|
79
81
|
// 1. use em to adjust gap between sizes
|
|
80
|
-
:is(
|
|
82
|
+
:is(h2, h3, h4, h5, h6):not(:first-child) {
|
|
81
83
|
margin-top: 2em; // 1
|
|
82
84
|
}
|
|
83
85
|
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
@use "../variables" as *;
|
|
2
2
|
|
|
3
|
-
// Use `em` for heading to allow for better spacing when larger sizes.
|
|
4
|
-
:where(h1, h2, h3, h4, h5, h6) + *:not(label) {
|
|
5
|
-
margin-top: $content-gap-em;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
3
|
:where(blockquote, p, pre, form, table, ol, ul, h1, h2, h3, h4, h5, h6) + *:not(label) {
|
|
9
4
|
margin-top: $content-gap;
|
|
10
5
|
}
|
package/src/color/_themes.scss
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// ---------------- BEFORE YOU DO ANYTHING CRAZY ------------------
|
|
9
9
|
// There is a fair bit going on here and the BUILD ORDER MATTERS.
|
|
10
10
|
// Make sure you read the comments before making any changes.
|
|
11
|
-
//
|
|
11
|
+
// ==========================================================================
|
|
12
12
|
|
|
13
13
|
$alert-theme: (
|
|
14
14
|
"danger-light": (
|
|
@@ -57,9 +57,9 @@ $extended-theme-overrides: (
|
|
|
57
57
|
// ),
|
|
58
58
|
) !default;
|
|
59
59
|
|
|
60
|
-
//
|
|
60
|
+
// ==========================================================================
|
|
61
61
|
// -- CREATE EXTENDED COLOR SCHEMES --
|
|
62
|
-
//
|
|
62
|
+
// ==========================================================================
|
|
63
63
|
// extended maps add extra element styles and classes. For example,
|
|
64
64
|
// `withState`, `bx-title` and link-colors.
|
|
65
65
|
//
|
|
@@ -75,9 +75,9 @@ $extended-themes: mapMerge($alert-theme, $themes-map, $extended-theme-overrides)
|
|
|
75
75
|
@include extendedThemeClass($theme-name, $map);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
//
|
|
78
|
+
// ==========================================================================
|
|
79
79
|
// -- CREATE BASIC COLOR SCHEMES --
|
|
80
|
-
//
|
|
80
|
+
// ==========================================================================
|
|
81
81
|
// To prevent duplication make sure the `$extended-themes` are
|
|
82
82
|
// created first.
|
|
83
83
|
|
|
@@ -90,9 +90,9 @@ $extended-themes: mapMerge($alert-theme, $themes-map, $extended-theme-overrides)
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
//
|
|
93
|
+
// ==========================================================================
|
|
94
94
|
// -- CREATE UTILITY CLASSES --
|
|
95
|
-
//
|
|
95
|
+
// ==========================================================================
|
|
96
96
|
|
|
97
97
|
// this could arguably be removed and just use base colors?? maybe
|
|
98
98
|
// leave main theme colors like primary, secondary, and accent
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
@use "../mixins/state" as *;
|
|
5
5
|
@use "../utilities/transition" as *;
|
|
6
6
|
|
|
7
|
-
//
|
|
7
|
+
// ==========================================================================
|
|
8
8
|
// -- BASE CLASS --
|
|
9
|
-
//
|
|
9
|
+
// ==========================================================================
|
|
10
10
|
// items that are in themes are more difficult to override in the
|
|
11
11
|
// base class. For example, setting the border-width in the base
|
|
12
12
|
// class will do nothing because the theme border takes precedence.
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
@include active($btn-bg);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//
|
|
38
|
+
// ==========================================================================
|
|
39
39
|
// -- THEMES AND VARIATIONS --
|
|
40
|
-
//
|
|
40
|
+
// ==========================================================================
|
|
41
41
|
//
|
|
42
42
|
// must explicitly create btn state to override base class because
|
|
43
43
|
// theme only apply when the `withState` modifier is included
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@use "../variables" as *;
|
|
2
2
|
|
|
3
|
-
//
|
|
3
|
+
// ==========================================================================
|
|
4
4
|
// -- TICK ICON LIST --
|
|
5
|
-
//
|
|
5
|
+
// ==========================================================================
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
.icon-list {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ---------------- BEFORE YOU DO ANYTHING CRAZY ------------------
|
|
6
6
|
// constant debate has surrounded a `hero-text` wrapper. It has been
|
|
7
7
|
// removed because it is easier to manage with utility classes
|
|
8
|
-
//
|
|
8
|
+
// ==========================================================================
|
|
9
9
|
|
|
10
10
|
.hero {
|
|
11
11
|
background-repeat: no-repeat;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@use "../variables/base" as *;
|
|
2
2
|
|
|
3
|
-
//
|
|
3
|
+
// ==========================================================================
|
|
4
4
|
// set text colour based on the background
|
|
5
|
-
//
|
|
5
|
+
// ==========================================================================
|
|
6
6
|
|
|
7
7
|
@function setTextColor($bg) {
|
|
8
8
|
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
//
|
|
34
|
+
// ==========================================================================
|
|
35
35
|
// Set transparent border color based on the background color.
|
|
36
|
-
//
|
|
36
|
+
// ==========================================================================
|
|
37
37
|
// this is not a perfect solution because sometimes a dark color can
|
|
38
38
|
// have a low lightness, and visa-versa, but it is good enough.
|
|
39
39
|
//
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
2
|
|
|
3
|
-
//
|
|
3
|
+
// ==========================================================================
|
|
4
4
|
// merge two or more maps into a single map.
|
|
5
|
-
//
|
|
5
|
+
// ==========================================================================
|
|
6
6
|
//
|
|
7
7
|
// EXAMPLE:
|
|
8
8
|
// $colors: mapMerge($map-a, $map-b, $map-c);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@use "../functions/helpers" as *;
|
|
2
2
|
@use "./media" as *;
|
|
3
|
-
//
|
|
3
|
+
// ==========================================================================
|
|
4
4
|
// -- CLASS CREATORS --
|
|
5
|
-
//
|
|
5
|
+
// ==========================================================================
|
|
6
6
|
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
@mixin singlePropertyClass($class, $property, $value, $breakpoints: "") {
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
//
|
|
55
|
+
// ==========================================================================
|
|
56
56
|
// -- CREATE ONE OR MANY PROPERTIES FROM MAP OF KEY-VALUE PAIRS --
|
|
57
|
-
//
|
|
57
|
+
// ==========================================================================
|
|
58
58
|
@mixin createProperties($props) {
|
|
59
59
|
@each $property, $value in $props {
|
|
60
60
|
#{$property}: $value;
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
#{$property}: $value;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
//
|
|
69
|
+
// ==========================================================================
|
|
70
70
|
// Generate properties based on positional requirements. For
|
|
71
71
|
// example, when `margin-top` requires a value for `top`, and
|
|
72
72
|
// `margin-x` requires values for `left` and `right`.
|
|
73
|
-
//
|
|
73
|
+
// ==========================================================================
|
|
74
74
|
// This mixin iterates through a list of positions, creating the
|
|
75
75
|
// appropriate property (e.g., `top`, `bottom`, `left`, `right`)
|
|
76
76
|
// based on the provided value.
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
// ---------------- BEFORE YOU DO ANYTHING CRAZY ------------------
|
|
89
89
|
// SCSS does not support interpolation for @include so there is no
|
|
90
90
|
// choice other than using multiple if-else statements.
|
|
91
|
-
//
|
|
91
|
+
// ==========================================================================
|
|
92
92
|
|
|
93
93
|
// output: {bp}\:identifier
|
|
94
94
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
@use "../mixins/class-helpers" as *;
|
|
3
3
|
@use "sass:string";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// ==========================================================================
|
|
6
6
|
// Standalone mixin to create single property unit based classes
|
|
7
|
-
//
|
|
7
|
+
// ==========================================================================
|
|
8
8
|
@mixin unitBasedClasses($property, $values, $identifier, $unit: "rem") {
|
|
9
9
|
@each $value in $values {
|
|
10
10
|
$escapedValue: escape-invalid($value);
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
//
|
|
29
|
+
// ==========================================================================
|
|
30
30
|
// creates multiple classes with different color shades
|
|
31
|
-
//
|
|
31
|
+
// ==========================================================================
|
|
32
32
|
|
|
33
33
|
@mixin colorShadeClasses($identifier, $base-color, $num-shades: 6, $step: get("shades.step", $config), $shade: "both") {
|
|
34
34
|
@include generateDarkerShades($identifier, $base-color, $num-shades, $step);
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
//
|
|
43
|
+
// ==========================================================================
|
|
44
44
|
// -- CREATE PROPERTIES FOR BASIC COLOR SCHEME --
|
|
45
|
-
//
|
|
45
|
+
// ==========================================================================
|
|
46
46
|
|
|
47
47
|
@mixin basicColorScheme($base, $border-color: setBorderShadeColor($base), $font-color: setTextColor($base)) {
|
|
48
48
|
background-color: $base;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
@use "../variables/utility_maps" as *;
|
|
4
4
|
@use "sass:list";
|
|
5
5
|
|
|
6
|
-
//
|
|
6
|
+
// ==========================================================================
|
|
7
7
|
// -- HELPER MIXIN FOR MAGIC CLASSES --
|
|
8
|
-
//
|
|
8
|
+
// ==========================================================================
|
|
9
9
|
// NOTE: the values do not include the unit!! These mixins will always use rem
|
|
10
10
|
// as the unit. I don't see this as a problem because all the classes that use
|
|
11
11
|
// these mixins will be using rem as the unit. If you need to use a different
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
//
|
|
48
|
+
// ==========================================================================
|
|
49
49
|
// -- GENERATE MAGIC CLASS FOR A SINGLE PROPERTY --
|
|
50
|
-
//
|
|
50
|
+
// ==========================================================================
|
|
51
51
|
// * `rem` is the default unit, pass in empty string to set to null
|
|
52
52
|
|
|
53
53
|
@mixin magicClass($property, $values-list, $identifier, $unit: "rem", $position-or-axis: "") {
|
package/src/mixins/_media.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use '../variables' as *;
|
|
2
2
|
|
|
3
3
|
// |-- on-device --|
|
|
4
|
-
//
|
|
4
|
+
// ==========================================================================
|
|
5
5
|
@mixin on-sm {
|
|
6
6
|
@media (min-width: $sm) and (max-width: calc($md - 1px)) {
|
|
7
7
|
@content;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// |-- from-device (device and larger) --|
|
|
36
|
-
//
|
|
36
|
+
// ==========================================================================
|
|
37
37
|
|
|
38
38
|
@mixin from-sm {
|
|
39
39
|
@media (min-width: $sm) {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
// |-- to-device (up-to but not including) --|
|
|
69
|
-
//
|
|
69
|
+
// ==========================================================================
|
|
70
70
|
@mixin to-sm {
|
|
71
71
|
@media (max-width: calc($sm - 1px)) {
|
|
72
72
|
@content;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
@use "../../mixins/class-helpers" as *;
|
|
3
3
|
@use "sass:string";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// ==========================================================================
|
|
6
6
|
// -- --
|
|
7
|
-
//
|
|
7
|
+
// ==========================================================================
|
|
8
8
|
|
|
9
9
|
@mixin generate-classes($properties-map) {
|
|
10
10
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
@use "../../mixins/class-helpers" as *;
|
|
3
3
|
@use "sass:string";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// ==========================================================================
|
|
6
6
|
// Generate class variants for a given property and list of values
|
|
7
|
-
//
|
|
7
|
+
// ==========================================================================
|
|
8
8
|
// !! IMPORTANT !! does not support position based classes
|
|
9
|
-
//
|
|
9
|
+
// ==========================================================================
|
|
10
10
|
// Note: I really don't like that you must set a unit to use the
|
|
11
11
|
// breakpoints, even if you don't want one. This is a tradeoff to
|
|
12
12
|
// allow responsive utilities to be generated from this mixin.
|
package/src/utilities/_grid.scss
CHANGED
|
@@ -5,10 +5,35 @@
|
|
|
5
5
|
@use "../mixins/magicGridGenerators" as *;
|
|
6
6
|
|
|
7
7
|
$gap: get("grid.default-gap", $config);
|
|
8
|
-
|
|
9
8
|
$gap-sizes: (0, 0.5, 1, 1.25, 1.5, 2, 3, 4, 5) !default;
|
|
10
9
|
$num-grid-cols: get("grid.num-grid-cols", $config);
|
|
11
10
|
|
|
11
|
+
// ==========================================================================
|
|
12
|
+
// -- GRID --
|
|
13
|
+
// ==========================================================================
|
|
14
|
+
// NK::TD refactor into a more reusable mixin
|
|
15
|
+
// Must sit above utility classes
|
|
16
|
+
|
|
17
|
+
@each $size in $gap-sizes {
|
|
18
|
+
$class: escapeDecimal($size);
|
|
19
|
+
.grid-#{$class} {
|
|
20
|
+
display: grid;
|
|
21
|
+
gap: #{$size}rem;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.grid {
|
|
25
|
+
display: grid;
|
|
26
|
+
gap: $gap;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.gap {
|
|
30
|
+
gap: $gap;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// ==========================================================================
|
|
34
|
+
// -- GENERAL --
|
|
35
|
+
// ==========================================================================
|
|
36
|
+
|
|
12
37
|
// prettier-ignore
|
|
13
38
|
$grid-properties-map: (
|
|
14
39
|
gap: (
|
|
@@ -39,30 +64,9 @@ $grid-properties-map: (
|
|
|
39
64
|
|
|
40
65
|
@include generate-utilities($grid-properties-map);
|
|
41
66
|
|
|
42
|
-
//
|
|
43
|
-
// -- GRID --
|
|
44
|
-
// ------------------------------------------------------------------
|
|
45
|
-
// NK::TD refactor into a more reusable mixin
|
|
46
|
-
|
|
47
|
-
.grid {
|
|
48
|
-
display: grid;
|
|
49
|
-
gap: $gap;
|
|
50
|
-
}
|
|
51
|
-
.gap {
|
|
52
|
-
gap: $gap;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@each $size in $gap-sizes {
|
|
56
|
-
$class: escapeDecimal($size);
|
|
57
|
-
.grid-#{$class} {
|
|
58
|
-
display: grid;
|
|
59
|
-
gap: #{$size}rem;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// ------------------------------------------------------------------
|
|
67
|
+
// ==========================================================================
|
|
64
68
|
// -- EQUAL WIDTHS COLUMNS(RESPONSIVE AND NON-RESPONSIVE) --
|
|
65
|
-
//
|
|
69
|
+
// ==========================================================================
|
|
66
70
|
@for $i from 1 through $num-grid-cols {
|
|
67
71
|
// base class
|
|
68
72
|
.cols-#{$i} {
|
|
@@ -77,9 +81,9 @@ $grid-properties-map: (
|
|
|
77
81
|
@include makeFromBreakpoint($props, $class, $breakpoints...);
|
|
78
82
|
}
|
|
79
83
|
|
|
80
|
-
//
|
|
84
|
+
// ==========================================================================
|
|
81
85
|
// -- MAGIC CLASSES --
|
|
82
|
-
//
|
|
86
|
+
// ==========================================================================
|
|
83
87
|
// THIS IS EXPERIMENTAL AND MAY NAT STAY IN THE CODEBASE
|
|
84
88
|
|
|
85
89
|
// ---------------- BEFORE YOU DO ANYTHING CRAZY ------------------
|
|
@@ -19,9 +19,9 @@ $sizing-properties-map: (
|
|
|
19
19
|
|
|
20
20
|
@include generate-utilities($sizing-properties-map);
|
|
21
21
|
|
|
22
|
-
//
|
|
22
|
+
// ==========================================================================
|
|
23
23
|
// -- WIDTH AND HEIGHT UTILITY CLASSES --
|
|
24
|
-
//
|
|
24
|
+
// ==========================================================================
|
|
25
25
|
|
|
26
26
|
// -- WIDTH & HEIGHT --
|
|
27
27
|
@each $size in $sizing-rem {
|
|
@@ -33,9 +33,9 @@ $sizing-properties-map: (
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// generateResponsiveClasses();
|
|
36
|
-
// //
|
|
36
|
+
// // ==========================================================================
|
|
37
37
|
// // -- RESPONSIVE SIZES --
|
|
38
|
-
// //
|
|
38
|
+
// // ==========================================================================
|
|
39
39
|
|
|
40
40
|
// // prettier-ignore
|
|
41
41
|
// @include makeFromBreakpoint((width: 16rem), "w-16", "sm", "md", "lg", "xl");
|
|
@@ -46,11 +46,11 @@ $sizing-properties-map: (
|
|
|
46
46
|
// // prettier-ignore
|
|
47
47
|
// @include makeFromBreakpoint((width: 100%), "w-full", "sm", "md", "lg", "xl");
|
|
48
48
|
|
|
49
|
-
//
|
|
49
|
+
// ==========================================================================
|
|
50
50
|
// I really don't think fractional widths are worth it. I think it
|
|
51
51
|
// is better to use the grid system for this. I am leaving this here
|
|
52
52
|
// for now but I think it will be removed in the future.
|
|
53
|
-
//
|
|
53
|
+
// ==========================================================================
|
|
54
54
|
|
|
55
55
|
// $fractional-sizes: (1\/4: 25%, 1\/3: 33.33%, 1\/2: 50%, 3\/4: 75%) !default;
|
|
56
56
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
//
|
|
2
|
+
// ==========================================================================
|
|
3
3
|
// -- DISABLED --
|
|
4
|
-
//
|
|
4
|
+
// ==========================================================================
|
|
5
5
|
:disabled,
|
|
6
6
|
.disabled {
|
|
7
7
|
cursor: not-allowed;
|
|
8
8
|
opacity: 0.5;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// ==========================================================================
|
|
12
12
|
// -- REVIEW --
|
|
13
|
-
//
|
|
13
|
+
// ==========================================================================
|
|
14
14
|
|
|
15
15
|
// .hover\:txt-primary:hover {
|
|
16
16
|
// color: $primary;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
// be overridden by utility classes
|
|
9
9
|
// ******************************************************************
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// ==========================================================================
|
|
12
12
|
// -- PROPERTY MAPS --
|
|
13
|
-
//
|
|
13
|
+
// ==========================================================================
|
|
14
14
|
// remove the following colours from the map
|
|
15
15
|
$text-colors: map.remove($color-map, "danger", "dark", "info", "light", "success", "warning");
|
|
16
16
|
|
|
@@ -25,9 +25,9 @@ $text-variant-sizes: (
|
|
|
25
25
|
// convert 'rem' sizes to map and merge with variant sizes
|
|
26
26
|
$text-variants: map-merge(listToMap($text-rem-sizes), $text-variant-sizes);
|
|
27
27
|
|
|
28
|
-
//
|
|
28
|
+
// ==========================================================================
|
|
29
29
|
// -- OPINIONATED TEXT CLASSES --
|
|
30
|
-
//
|
|
30
|
+
// ==========================================================================
|
|
31
31
|
//
|
|
32
32
|
.lead {
|
|
33
33
|
font-size: 1.2rem;
|
|
@@ -62,9 +62,9 @@ $text-variants: map-merge(listToMap($text-rem-sizes), $text-variant-sizes);
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
//
|
|
65
|
+
// ==========================================================================
|
|
66
66
|
// -- UTILITY CLASS MAP --
|
|
67
|
-
//
|
|
67
|
+
// ==========================================================================
|
|
68
68
|
|
|
69
69
|
// pettier-ignore
|
|
70
70
|
$typography-properties-map: (
|
package/src/variables/_base.scss
CHANGED
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
// generic
|
|
6
6
|
$text: #333;
|
|
7
|
-
$
|
|
7
|
+
$body-bg: #ffffff;
|
|
8
8
|
$primary: #2563eb;
|
|
9
9
|
$secondary: #181e20;
|
|
10
10
|
$accent: #ffbb1c;
|
|
11
11
|
|
|
12
12
|
// dark
|
|
13
13
|
// $text: #e4e8ec;
|
|
14
|
-
// $
|
|
14
|
+
// $body-bg: #0b101d;
|
|
15
15
|
// $primary: #2876dc;
|
|
16
16
|
// $secondary: #e1e1df;
|
|
17
17
|
// $accent: #e6c637;
|
|
18
18
|
|
|
19
19
|
$text: $text !default;
|
|
20
|
-
$
|
|
20
|
+
$body-bg: $body-bg !default;
|
|
21
21
|
$primary: $primary !default;
|
|
22
22
|
$secondary: $secondary !default;
|
|
23
23
|
$accent: $accent !default;
|
|
@@ -61,8 +61,6 @@ $copyright-text-color: $footer-text-color !default;
|
|
|
61
61
|
// ==========================================================================
|
|
62
62
|
$base-list-spacing: 0.25em !default;
|
|
63
63
|
$content-gap: 1.25rem;
|
|
64
|
-
// better for headings
|
|
65
|
-
$content-gap-em: 1.25em;
|
|
66
64
|
|
|
67
65
|
// ==========================================================================
|
|
68
66
|
// -- Responsive Sizes and Breakpoints --
|
|
@@ -51,10 +51,10 @@ $btn-text-transform: capitalize;
|
|
|
51
51
|
|
|
52
52
|
// -- icons --
|
|
53
53
|
// ==============================================================
|
|
54
|
-
$icon-xy-sm:
|
|
55
|
-
$icon-xy: 1.
|
|
56
|
-
$icon-xy-md:
|
|
57
|
-
$icon-xy-lg:
|
|
54
|
+
$icon-xy-sm: 1rem !default;
|
|
55
|
+
$icon-xy: 1.5rem !default;
|
|
56
|
+
$icon-xy-md: 2rem !default;
|
|
57
|
+
$icon-xy-lg: 3rem !default;
|
|
58
58
|
$icon-color: inherit !default;
|
|
59
59
|
|
|
60
60
|
// -- menu --
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
@use "../variables/colors" as *;
|
|
3
3
|
@use "sass:map";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// ==========================================================================
|
|
6
6
|
// -- AXIS TO POSITIONS MAP --
|
|
7
|
-
//
|
|
7
|
+
// ==========================================================================
|
|
8
8
|
// Uses the key to defines the mapping structure that can be used to
|
|
9
9
|
// retrieve css positions for a axis or position.
|
|
10
10
|
//
|
|
@@ -38,9 +38,9 @@ $corners-map: (
|
|
|
38
38
|
br: bottom-right,
|
|
39
39
|
);
|
|
40
40
|
|
|
41
|
-
//
|
|
41
|
+
// ==========================================================================
|
|
42
42
|
// -- COMMON SIZES (REM) --
|
|
43
|
-
//
|
|
43
|
+
// ==========================================================================
|
|
44
44
|
// for creating margin, padding and other size related utilities.
|
|
45
45
|
//
|
|
46
46
|
// DO NOT add unit here, it can get in the way with some mixins
|
|
@@ -85,26 +85,26 @@ $fr-conversion-2-col: (
|
|
|
85
85
|
80: ( 4fr, 1fr )
|
|
86
86
|
);
|
|
87
87
|
|
|
88
|
-
//
|
|
88
|
+
// ==========================================================================
|
|
89
89
|
// Border, and border-radius sizes
|
|
90
|
-
//
|
|
90
|
+
// ==========================================================================
|
|
91
91
|
$border-color-variants: (light: rgba(255, 255, 255, 0.15), dark: rgba(0, 0, 0, 0.15) ) !default;
|
|
92
92
|
$border-colors: map.remove($color-map, "danger", "dark", "info", "light", "success", "warning") !default;
|
|
93
93
|
|
|
94
94
|
$border-radius-sizes: (0, 0.25, 0.5, 0.75, 1, 1.5, 2) !default;
|
|
95
95
|
$border-radius-variants: (xs: 0.125rem, sm: 0.25rem, base: 0.375, lg: 0.5rem, xl: 0.75rem, full: 9999rem) !default;
|
|
96
96
|
|
|
97
|
-
//
|
|
97
|
+
// ==========================================================================
|
|
98
98
|
// Space sizes and variants for margin and padding utilities
|
|
99
|
-
//
|
|
99
|
+
// ==========================================================================
|
|
100
100
|
|
|
101
101
|
$space-rem-sizes: (0, 0.125, 0.25, 0.5, 0.75, 0.875, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 4, 5) !default;
|
|
102
102
|
$margin-variants: (base: 1.5, auto: auto) !default;
|
|
103
103
|
$padding-variants: (default: 1.5) !default;
|
|
104
104
|
|
|
105
|
-
//
|
|
105
|
+
// ==========================================================================
|
|
106
106
|
// Sizing maps and variants
|
|
107
|
-
//
|
|
107
|
+
// ==========================================================================
|
|
108
108
|
|
|
109
109
|
$sizing-pixels: (200px, 250px, 300px, 400px, 600px) !default; // include unit to make merge easier
|
|
110
110
|
$sizing-rem: (0, 1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24) !default;
|