nk_jtb 0.6.0 → 0.7.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 +2 -1
- package/scss/_nk.scss +75 -12
- package/scss/base/_base.scss +1 -2
- package/scss/mixins/{_makeCssPropertyMixins.scss → _helpers.scss} +7 -7
- package/scss/mixins/_makeMagicClass.scss +6 -6
- package/scss/mixins/_makeResponsiveClasses.scss +44 -45
- package/scss/mixins/_makeResponsivePositionUtilities.scss +5 -5
- package/scss/mixins/_positionUtilityClasses.scss +2 -2
- package/scss/play.scss +13 -13
- package/scss/utilities/_display_visibility.scss +15 -13
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nk_jtb",
|
|
3
3
|
"description": "Yet another utility based framework.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/naykel76/nk_jtb.git"
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"flex": "sass --watch --no-source-map ./scss/utilities/_flex.scss:dist/css/flex.css",
|
|
15
15
|
"grid": "sass --watch --no-source-map ./scss/utilities/_grid.scss:dist/css/grid.css",
|
|
16
16
|
"play": "sass --watch --no-source-map ./scss/play.scss:dist/css/play.css",
|
|
17
|
+
"jtb": "sass --watch --no-source-map ./scss/jtb.scss:dist/css/jtb.css",
|
|
17
18
|
"dev": "vite --open",
|
|
18
19
|
"build": "vite build",
|
|
19
20
|
"preview": "vite preview"
|
package/scss/_nk.scss
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
// what else it affects
|
|
17
17
|
#nk-header,
|
|
18
18
|
#nk-header > .#{$container-class} {
|
|
19
|
-
|
|
20
19
|
#search {
|
|
21
20
|
display: flex;
|
|
22
21
|
flex: 1 1 auto;
|
|
@@ -74,16 +73,6 @@
|
|
|
74
73
|
// -- BITS AND BOB'S --
|
|
75
74
|
// ==========================================================================
|
|
76
75
|
|
|
77
|
-
// make code block comments stand out
|
|
78
|
-
.hljs-comment {
|
|
79
|
-
color: hsl(120, 98%, 35%) !important;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
pre code.hljs{
|
|
83
|
-
padding: 1.5em !important;
|
|
84
|
-
line-height: 2;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
76
|
trix-editor {
|
|
88
77
|
background: white !important;
|
|
89
78
|
min-height: 100px !important;
|
|
@@ -98,6 +87,81 @@ trix-editor {
|
|
|
98
87
|
}
|
|
99
88
|
}
|
|
100
89
|
|
|
90
|
+
// ==========================================================================
|
|
91
|
+
// -- MARKDOWN --
|
|
92
|
+
// ==========================================================================
|
|
93
|
+
|
|
94
|
+
// make code block comments stand out
|
|
95
|
+
.hljs-comment {
|
|
96
|
+
color: hsl(120, 98%, 35%) !important;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
pre code.hljs {
|
|
100
|
+
padding: 1.5em !important;
|
|
101
|
+
line-height: 2;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.code-first-col,
|
|
105
|
+
.code-second-col,
|
|
106
|
+
.code-all-col {
|
|
107
|
+
+ table tbody {
|
|
108
|
+
margin-top: $content-gap;
|
|
109
|
+
font-size: 0.85em;
|
|
110
|
+
tr td:first-child {
|
|
111
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
112
|
+
color: #f0506e;
|
|
113
|
+
border-radius: 0.25rem;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.code-all-col {
|
|
119
|
+
+ table tbody {
|
|
120
|
+
td {
|
|
121
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
122
|
+
color: #f0506e;
|
|
123
|
+
border-radius: 0.25rem;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.markdown {
|
|
129
|
+
// hack to remove indented when using @verbatim
|
|
130
|
+
.-ml-2 pre code {
|
|
131
|
+
margin-left: -2rem;
|
|
132
|
+
}
|
|
133
|
+
.-ml-3 pre code {
|
|
134
|
+
margin-left: -3rem;
|
|
135
|
+
}
|
|
136
|
+
.-ml-4 pre code {
|
|
137
|
+
margin-left: -4rem;
|
|
138
|
+
}
|
|
139
|
+
.-ml-5 pre code {
|
|
140
|
+
margin-left: -5rem;
|
|
141
|
+
}
|
|
142
|
+
.-ml-7 pre code {
|
|
143
|
+
margin-left: -7rem;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
table {
|
|
147
|
+
width: 100%; // DON'T CHANGE!!
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// allow to work in markdown component with div
|
|
151
|
+
pre {
|
|
152
|
+
margin-top: $content-gap;
|
|
153
|
+
margin-bottom: $content-gap;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
h2::before {
|
|
157
|
+
content: " ";
|
|
158
|
+
display: block;
|
|
159
|
+
width: 100%;
|
|
160
|
+
margin-bottom: 2rem;
|
|
161
|
+
height: 12px;
|
|
162
|
+
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");
|
|
163
|
+
}
|
|
164
|
+
}
|
|
101
165
|
|
|
102
166
|
// ==========================================================================
|
|
103
167
|
// -- Primary banner for page layouts --
|
|
@@ -119,4 +183,3 @@ $banner-text-bg: transparent !default;
|
|
|
119
183
|
padding: 1rem;
|
|
120
184
|
}
|
|
121
185
|
}
|
|
122
|
-
|
package/scss/base/_base.scss
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
// --------------------------------------------------------------
|
|
2
|
-
// -- CREATE POSITION BASED
|
|
2
|
+
// -- CREATE POSITION BASED PROPERTIES --
|
|
3
3
|
// --------------------------------------------------------------
|
|
4
4
|
// iterates through a list of positions creating the appropriate
|
|
5
5
|
// property (top, bottom, left, right)
|
|
6
6
|
|
|
7
|
-
@mixin
|
|
7
|
+
@mixin makePositionProperties($property, $value, $positions) {
|
|
8
8
|
@each $position in $positions {
|
|
9
9
|
#{$property}-#{$position}: $value;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
// --------------------------------------------------------------
|
|
14
|
-
// -- CREATE SINGLE
|
|
14
|
+
// -- CREATE SINGLE PROPERTY --
|
|
15
15
|
// --------------------------------------------------------------
|
|
16
|
-
// creates a single size based properties.
|
|
17
|
-
|
|
18
|
-
@mixin makeCssProperty($property, $value, $unit: null) {
|
|
16
|
+
// creates a single size based properties.
|
|
17
|
+
@mixin makeUnitProperty($property, $value, $unit: null) {
|
|
19
18
|
$val: if($value == "full", 100, $value);
|
|
20
19
|
$u: if($value == "full", "%", $unit);
|
|
21
20
|
#{$property}: #{$val}#{$u};
|
|
@@ -24,7 +23,8 @@
|
|
|
24
23
|
// --------------------------------------------------------------
|
|
25
24
|
// -- CREATE SINGLE PROPERTY CLASS --
|
|
26
25
|
// --------------------------------------------------------------
|
|
27
|
-
|
|
26
|
+
// optionally add a breakpoint to make responsive
|
|
27
|
+
@mixin makeClass($class, $property, $value) {
|
|
28
28
|
.#{$class} {
|
|
29
29
|
#{$property}: $value;
|
|
30
30
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use "./media" as *;
|
|
2
|
-
@use "./
|
|
2
|
+
@use "./helpers" as *;
|
|
3
3
|
@use "sass:list";
|
|
4
4
|
@use "sass:map";
|
|
5
5
|
@use "sass:string";
|
|
@@ -35,24 +35,24 @@
|
|
|
35
35
|
|
|
36
36
|
.#{$prefix}-#{$derived-class} {
|
|
37
37
|
@include from-sm {
|
|
38
|
-
@include
|
|
38
|
+
@include makeUnitProperty($property, $smValue, $unit);
|
|
39
39
|
}
|
|
40
40
|
@include from-md {
|
|
41
|
-
@include
|
|
41
|
+
@include makeUnitProperty($property, $mdValue, $unit);
|
|
42
42
|
}
|
|
43
43
|
@if ($numBreakPoints >= 3) {
|
|
44
44
|
@include from-lg {
|
|
45
|
-
@include
|
|
45
|
+
@include makeUnitProperty($property, $lgValue, $unit);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
@if ($numBreakPoints >= 4) {
|
|
49
49
|
@include from-xl {
|
|
50
|
-
@include
|
|
50
|
+
@include makeUnitProperty($property, $xlValue, $unit);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
@if ($numBreakPoints >= 5) {
|
|
54
54
|
@include from-xxl {
|
|
55
|
-
@include
|
|
55
|
+
@include makeUnitProperty($property, $xxlValue,$unit);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -1,89 +1,88 @@
|
|
|
1
1
|
@use "./media" as *;
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
3
|
+
// ---------------- BEFORE YOU DO ANYTHING CRAZY ------------------
|
|
4
|
+
// SCSS does not support interpolation for @include so there is no
|
|
5
|
+
// choice other than using multiple if-else statements.
|
|
6
|
+
// ---------------- BEFORE YOU DO ANYTHING CRAZY ------------------
|
|
6
7
|
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@
|
|
12
|
-
@each $device in $args {
|
|
13
|
-
.#{$prefix}#{$device} {
|
|
14
|
-
@if ($device == "sm") {
|
|
8
|
+
// output: {bp}\:class
|
|
9
|
+
@mixin makeFromBreakpoint($class, $property, $value, $breakpoints...) {
|
|
10
|
+
@each $bp in $breakpoints {
|
|
11
|
+
.#{$bp}\:#{$class} {
|
|
12
|
+
@if ($bp == "sm") {
|
|
15
13
|
@include from-sm {
|
|
16
|
-
#{$property}: $value
|
|
14
|
+
#{$property}: $value;
|
|
17
15
|
}
|
|
18
|
-
} @else if($
|
|
16
|
+
} @else if($bp == "md") {
|
|
19
17
|
@include from-md {
|
|
20
|
-
#{$property}: $value
|
|
18
|
+
#{$property}: $value;
|
|
21
19
|
}
|
|
22
|
-
} @else if($
|
|
20
|
+
} @else if($bp == "lg") {
|
|
23
21
|
@include from-lg {
|
|
24
|
-
#{$property}: $value
|
|
22
|
+
#{$property}: $value;
|
|
25
23
|
}
|
|
26
|
-
} @else if($
|
|
24
|
+
} @else if($bp == "xl") {
|
|
27
25
|
@include from-xl {
|
|
28
|
-
#{$property}: $value
|
|
26
|
+
#{$property}: $value;
|
|
29
27
|
}
|
|
30
|
-
} @else if($
|
|
28
|
+
} @else if($bp == "xxl") {
|
|
31
29
|
@include from-xxl {
|
|
32
|
-
#{$property}: $value
|
|
30
|
+
#{$property}: $value;
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
// output: to-{breakpoint}\:class
|
|
38
|
+
@mixin makeToBreakpoint($class, $property, $value, $breakpoints...) {
|
|
39
|
+
@each $bp in $breakpoints {
|
|
40
|
+
.#{$bp}\:#{$class} {
|
|
41
|
+
@if ($bp == "sm") {
|
|
43
42
|
@include to-sm {
|
|
44
|
-
#{$property}: $value
|
|
43
|
+
#{$property}: $value;
|
|
45
44
|
}
|
|
46
|
-
} @else if($
|
|
45
|
+
} @else if($bp == "md") {
|
|
47
46
|
@include to-md {
|
|
48
|
-
#{$property}: $value
|
|
47
|
+
#{$property}: $value;
|
|
49
48
|
}
|
|
50
|
-
} @else if($
|
|
49
|
+
} @else if($bp == "lg") {
|
|
51
50
|
@include to-lg {
|
|
52
|
-
#{$property}: $value
|
|
51
|
+
#{$property}: $value;
|
|
53
52
|
}
|
|
54
|
-
} @else if($
|
|
53
|
+
} @else if($bp == "xl") {
|
|
55
54
|
@include to-xl {
|
|
56
|
-
#{$property}: $value
|
|
55
|
+
#{$property}: $value;
|
|
57
56
|
}
|
|
58
57
|
} @else {
|
|
59
|
-
@error 'The device '#{$
|
|
58
|
+
@error 'The device '#{$bp}' is not available for this mixin, you need to remove it from the args list.';
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
@mixin
|
|
66
|
-
@each $
|
|
67
|
-
.#{$
|
|
68
|
-
@if ($
|
|
64
|
+
@mixin makeOnBreakpoint($class, $property, $value, $breakpoints...) {
|
|
65
|
+
@each $bp in $breakpoints {
|
|
66
|
+
.#{$bp}\:#{$class} {
|
|
67
|
+
@if ($bp == "sm") {
|
|
69
68
|
@include on-sm {
|
|
70
|
-
#{$property}: $value
|
|
69
|
+
#{$property}: $value;
|
|
71
70
|
}
|
|
72
|
-
} @else if($
|
|
71
|
+
} @else if($bp == "md") {
|
|
73
72
|
@include on-md {
|
|
74
|
-
#{$property}: $value
|
|
73
|
+
#{$property}: $value;
|
|
75
74
|
}
|
|
76
|
-
} @else if($
|
|
75
|
+
} @else if($bp == "lg") {
|
|
77
76
|
@include on-lg {
|
|
78
|
-
#{$property}: $value
|
|
77
|
+
#{$property}: $value;
|
|
79
78
|
}
|
|
80
|
-
} @else if($
|
|
79
|
+
} @else if($bp == "xl") {
|
|
81
80
|
@include on-xl {
|
|
82
|
-
#{$property}: $value
|
|
81
|
+
#{$property}: $value;
|
|
83
82
|
}
|
|
84
|
-
} @else if($
|
|
83
|
+
} @else if($bp == "xxl") {
|
|
85
84
|
@include on-xxl {
|
|
86
|
-
#{$property}: $value
|
|
85
|
+
#{$property}: $value;
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
88
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use '../base/vars_all' as *;
|
|
2
|
-
@use "./
|
|
2
|
+
@use "./helpers" as *;
|
|
3
3
|
@use "./media" as *;
|
|
4
4
|
@use "sass:list";
|
|
5
5
|
@use "sass:map";
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
|
|
39
39
|
// use -index to select from the end to ensure correct order with different length lists
|
|
40
40
|
.#{$class} {
|
|
41
|
-
@include
|
|
41
|
+
@include makePositionProperties($property, #{nth($sizes-list, -1)}rem, $positions);
|
|
42
42
|
|
|
43
43
|
@include from-md {
|
|
44
|
-
@include
|
|
44
|
+
@include makePositionProperties($property, #{nth($sizes-list, -2)}rem, $positions);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
@include from-xl {
|
|
48
|
-
@include
|
|
48
|
+
@include makePositionProperties($property, #{nth($sizes-list, -3)}rem, $positions);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
@if ($numSizes==4) {
|
|
52
52
|
@include from-xxl {
|
|
53
|
-
@include
|
|
53
|
+
@include makePositionProperties($property, #{nth($sizes-list, -4)}rem, $positions);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use "./makeCssPropertyMixins" as *;
|
|
2
1
|
@use "../functions/helpers" as *;
|
|
2
|
+
@use "../mixins/helpers" as *;
|
|
3
3
|
// --------------------------------------------------------------
|
|
4
4
|
// -- CREATES BASE AND POSITION BASED UTILITY CLASSES FROM MAP --
|
|
5
5
|
// --------------------------------------------------------------
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
#{$property}-left: #{$value};
|
|
51
51
|
#{$property}-right: #{$value};
|
|
52
52
|
} @else {
|
|
53
|
-
@include
|
|
53
|
+
@include makePositionProperties($property, #{$value}, $positions);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
package/scss/play.scss
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
@use "./base/vars_all" as *;
|
|
2
|
+
@use "./base/vars_base" as *;
|
|
3
|
+
@use "./base/vars_utility_maps" as *;
|
|
4
|
+
@use "./functions/helpers" as *;
|
|
5
|
+
@use "./mixins/helpers" as *;
|
|
6
|
+
@use "./mixins/makeMagicClass" as *;
|
|
7
|
+
@use "./mixins/makeMagicGrid2Cols" as *;
|
|
8
|
+
@use "./mixins/makeResponsiveClasses" as *;
|
|
9
|
+
@use "./mixins/media" as *;
|
|
10
|
+
@use "./mixins/positionUtilityClasses" as *;
|
|
11
|
+
@use "sass:list";
|
|
12
|
+
@use "sass:map";
|
|
13
|
+
@use "sass:string";
|
|
14
14
|
|
|
15
15
|
|
|
@@ -48,19 +48,21 @@ $visibility-utilities: (
|
|
|
48
48
|
|
|
49
49
|
// |--\0/-- DISPLAY --\0/--|
|
|
50
50
|
// --------------------------------------------------------------------------
|
|
51
|
-
[class*="block-to"],
|
|
52
|
-
[class*="block-from"],
|
|
53
|
-
[class*="block-on"] {
|
|
54
|
-
display: none;
|
|
55
|
-
}
|
|
56
51
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
// NK::TD THIS IS A PROBLEM!!!
|
|
53
|
+
// [class*="block-to"],
|
|
54
|
+
// [class*="block-from"],
|
|
55
|
+
// [class*="block-on"] {
|
|
56
|
+
// display: none;
|
|
57
|
+
// }
|
|
60
58
|
|
|
61
|
-
//
|
|
62
|
-
|
|
59
|
+
// [class$=":block"]
|
|
60
|
+
|
|
61
|
+
@include makeFromBreakpoint(block, display, block, "sm", "md", "lg", "xl", "xxl");
|
|
62
|
+
@include makeFromBreakpoint(hide, display, none, "sm", "md", "lg", "xl", "xxl");
|
|
63
|
+
|
|
64
|
+
@include makeOnBreakpoint("block", display, block, "sm", "md", "lg", "xl", "xxl");
|
|
65
|
+
@include makeOnBreakpoint("hide", display, none, "sm", "md", "lg", "xl", "xxl");
|
|
63
66
|
|
|
64
|
-
@include
|
|
65
|
-
@include
|
|
66
|
-
@include makeToDevice("hide-to-", display, none, "sm", "md", "lg", "xl");
|
|
67
|
+
@include makeToBreakpoint("block", display, block, "sm", "md", "lg", "xl");
|
|
68
|
+
@include makeToBreakpoint("hide", display, none, "sm", "md", "lg", "xl");
|