@nuvoui/core 1.2.4 → 1.2.5
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/dist/nuvoui.css +31748 -25953
- package/dist/nuvoui.css.map +1 -1
- package/dist/nuvoui.min.css +1 -1
- package/dist/nuvoui.min.css.map +1 -1
- package/package.json +6 -7
- package/src/styles/abstracts/_config.scss +21 -2
- package/src/styles/abstracts/_functions.scss +73 -0
- package/src/styles/base/_base.scss +21 -9
- package/src/styles/index.scss +2 -5
- package/src/styles/mixins-map.scss +1 -1
- package/src/styles/themes/_theme.scss +20 -67
- package/src/styles/utilities/_alignment.scss +4 -4
- package/src/styles/utilities/_animations.scss +294 -85
- package/src/styles/utilities/_backdrop-filters.scss +269 -0
- package/src/styles/utilities/_borders.scss +46 -31
- package/src/styles/utilities/_colors.scss +0 -9
- package/src/styles/utilities/_helpers.scss +1 -1
- package/src/styles/utilities/_index.scss +3 -0
- package/src/styles/utilities/_sizing.scss +30 -13
- package/src/styles/utilities/_spacing.scss +103 -53
- package/src/styles/utilities/_tooltips.scss +3 -0
- package/src/styles/utilities/_transforms.scss +192 -126
- package/src/styles/utilities/_transitions.scss +4 -16
- package/src/styles/utilities/_z-index.scss +114 -0
|
@@ -3,12 +3,36 @@
|
|
|
3
3
|
|
|
4
4
|
@use 'sass:math';
|
|
5
5
|
@use 'sass:map';
|
|
6
|
-
@use '
|
|
7
|
-
|
|
6
|
+
@use 'sass:meta';
|
|
7
|
+
@use 'sass:string' as str;
|
|
8
|
+
@use '../abstracts' as *;
|
|
9
|
+
@use '../abstracts/functions' as FN;
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
// Common border styles
|
|
11
13
|
$border-styles: (solid, dashed, dotted, double, none);
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@function get-rounded-value($val) {
|
|
17
|
+
@if not $val {
|
|
18
|
+
@return map.get($border-radii, 'md');
|
|
19
|
+
} @else if meta.type-of($val) == string {
|
|
20
|
+
$clean-val: $val;
|
|
21
|
+
|
|
22
|
+
// Try to find the value in the border-radii map
|
|
23
|
+
@if map.has-key($border-radii, $clean-val) {
|
|
24
|
+
@return map.get($border-radii, $clean-val);
|
|
25
|
+
} @else if map.has-key($border-radii, str.unquote($clean-val)) {
|
|
26
|
+
@return map.get($border-radii, str.unquote($clean-val));
|
|
27
|
+
} @else {
|
|
28
|
+
// Not a predefined value, process it as a custom value
|
|
29
|
+
@return FN.fix-units($val);
|
|
30
|
+
}
|
|
31
|
+
} @else {
|
|
32
|
+
// Case 3: $val is a custom value, ensure it has units
|
|
33
|
+
@return FN.fix-units($val);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
12
36
|
|
|
13
37
|
// -----------------------------------------------
|
|
14
38
|
// MIXINS
|
|
@@ -17,14 +41,18 @@ $border-styles: (solid, dashed, dotted, double, none);
|
|
|
17
41
|
// Core Border Mixins - improved to include style and color by default
|
|
18
42
|
// SKIP Documentation
|
|
19
43
|
@mixin border($val, $style: solid, $color: var(--border)) {
|
|
44
|
+
$val: FN.fix-units($val);
|
|
45
|
+
|
|
20
46
|
border-width: $val;
|
|
21
47
|
@if $val != 0 {
|
|
22
48
|
border-style: $style;
|
|
23
49
|
border-color: $color;
|
|
24
50
|
}
|
|
25
|
-
}
|
|
51
|
+
}
|
|
26
52
|
|
|
27
53
|
@mixin border-top($val) {
|
|
54
|
+
$val: FN.fix-units($val);
|
|
55
|
+
|
|
28
56
|
border-top-width: $val;
|
|
29
57
|
@if $val != 0 {
|
|
30
58
|
border-top-style: solid;
|
|
@@ -33,6 +61,8 @@ $border-styles: (solid, dashed, dotted, double, none);
|
|
|
33
61
|
}
|
|
34
62
|
|
|
35
63
|
@mixin border-right($val) {
|
|
64
|
+
$val: FN.fix-units($val);
|
|
65
|
+
|
|
36
66
|
border-right-width: $val;
|
|
37
67
|
@if $val != 0 {
|
|
38
68
|
border-right-style: solid;
|
|
@@ -41,6 +71,8 @@ $border-styles: (solid, dashed, dotted, double, none);
|
|
|
41
71
|
}
|
|
42
72
|
|
|
43
73
|
@mixin border-bottom($val) {
|
|
74
|
+
$val: FN.fix-units($val);
|
|
75
|
+
|
|
44
76
|
border-bottom-width: $val;
|
|
45
77
|
@if $val != 0 {
|
|
46
78
|
border-bottom-style: solid;
|
|
@@ -49,6 +81,8 @@ $border-styles: (solid, dashed, dotted, double, none);
|
|
|
49
81
|
}
|
|
50
82
|
|
|
51
83
|
@mixin border-left($val) {
|
|
84
|
+
$val: FN.fix-units($val);
|
|
85
|
+
|
|
52
86
|
border-left-width: $val;
|
|
53
87
|
@if $val != 0 {
|
|
54
88
|
border-left-style: solid;
|
|
@@ -61,54 +95,54 @@ $border-styles: (solid, dashed, dotted, double, none);
|
|
|
61
95
|
* @param {String} $val - The border radius value
|
|
62
96
|
*/
|
|
63
97
|
@mixin rounded($val: null) {
|
|
64
|
-
border-radius:
|
|
98
|
+
border-radius: get-rounded-value($val);
|
|
65
99
|
}
|
|
66
100
|
|
|
67
101
|
@mixin rounded-t($val: null) {
|
|
68
|
-
$val:
|
|
102
|
+
$val: get-rounded-value($val);
|
|
69
103
|
|
|
70
104
|
border-top-left-radius: $val;
|
|
71
105
|
border-top-right-radius: $val;
|
|
72
106
|
}
|
|
73
107
|
|
|
74
108
|
@mixin rounded-r($val: null) {
|
|
75
|
-
$val:
|
|
109
|
+
$val: get-rounded-value($val);
|
|
76
110
|
|
|
77
111
|
border-top-right-radius: $val;
|
|
78
112
|
border-bottom-right-radius: $val;
|
|
79
113
|
}
|
|
80
114
|
|
|
81
115
|
@mixin rounded-b($val: null) {
|
|
82
|
-
$val:
|
|
116
|
+
$val: get-rounded-value($val);
|
|
83
117
|
|
|
84
118
|
border-bottom-left-radius: $val;
|
|
85
119
|
border-bottom-right-radius: $val;
|
|
86
120
|
}
|
|
87
121
|
|
|
88
122
|
@mixin rounded-l($val: null) {
|
|
89
|
-
$val:
|
|
123
|
+
$val: get-rounded-value($val);
|
|
90
124
|
|
|
91
125
|
border-top-left-radius: $val;
|
|
92
126
|
border-bottom-left-radius: $val;
|
|
93
127
|
}
|
|
94
128
|
|
|
95
129
|
@mixin rounded-tl($val: null) {
|
|
96
|
-
$val:
|
|
130
|
+
$val: get-rounded-value($val);
|
|
97
131
|
|
|
98
132
|
border-top-left-radius: $val;
|
|
99
133
|
}
|
|
100
134
|
@mixin rounded-tr($val: null) {
|
|
101
|
-
$val:
|
|
135
|
+
$val: get-rounded-value($val);
|
|
102
136
|
|
|
103
137
|
border-top-right-radius: $val;
|
|
104
138
|
}
|
|
105
139
|
@mixin rounded-br($val: null) {
|
|
106
|
-
$val:
|
|
140
|
+
$val: get-rounded-value($val);
|
|
107
141
|
|
|
108
142
|
border-bottom-right-radius: $val;
|
|
109
143
|
}
|
|
110
144
|
@mixin rounded-bl($val: null) {
|
|
111
|
-
$val:
|
|
145
|
+
$val: get-rounded-value($val);
|
|
112
146
|
|
|
113
147
|
border-bottom-left-radius: $val;
|
|
114
148
|
}
|
|
@@ -126,25 +160,6 @@ $border-styles: (solid, dashed, dotted, double, none);
|
|
|
126
160
|
|
|
127
161
|
@mixin pill { @include rounded(9999px); } // todo: doc missing
|
|
128
162
|
|
|
129
|
-
// -----------------------------------------------
|
|
130
|
-
// VARIABLES
|
|
131
|
-
// -----------------------------------------------
|
|
132
|
-
|
|
133
|
-
// Common border width values that are most useful
|
|
134
|
-
$border-widths: (0, 1, 2, 4, 8);
|
|
135
|
-
|
|
136
|
-
// Common border radius values that are most useful
|
|
137
|
-
$border-radii: (
|
|
138
|
-
'xs': 0.25rem,
|
|
139
|
-
'sm': 0.375rem,
|
|
140
|
-
'md': 0.5rem,
|
|
141
|
-
'lg': 0.75rem,
|
|
142
|
-
'xl': 1rem,
|
|
143
|
-
'2xl': 1.25rem,
|
|
144
|
-
'full': 9999px,
|
|
145
|
-
'none': 0
|
|
146
|
-
);
|
|
147
|
-
|
|
148
163
|
// -----------------------------------------------
|
|
149
164
|
// UTILITY CLASSES
|
|
150
165
|
// -----------------------------------------------
|
|
@@ -108,12 +108,3 @@ $colors-primitives: ();
|
|
|
108
108
|
@mixin gradient($direction, $colors...) {
|
|
109
109
|
background-image: linear-gradient($direction, $colors);
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
// Filter Mixins
|
|
113
|
-
@mixin backdrop-filter($value) {
|
|
114
|
-
backdrop-filter: $value;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
@mixin filter($value) {
|
|
118
|
-
filter: $value;
|
|
119
|
-
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// Forward all utility files
|
|
4
4
|
@forward "alignment";
|
|
5
5
|
@forward "animations";
|
|
6
|
+
@forward "backdrop-filters";
|
|
6
7
|
@forward "borders";
|
|
7
8
|
@forward "colors";
|
|
8
9
|
@forward "container-queries";
|
|
@@ -16,5 +17,7 @@
|
|
|
16
17
|
@forward "sizing";
|
|
17
18
|
@forward "spacing";
|
|
18
19
|
@forward "tooltips";
|
|
20
|
+
@forward "transforms";
|
|
19
21
|
@forward "transitions";
|
|
20
22
|
@forward "typography";
|
|
23
|
+
@forward "z-index";
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
@use 'sass:math';
|
|
4
4
|
@use 'sass:string' as str;
|
|
5
5
|
@use '../abstracts' as VAR;
|
|
6
|
+
@use '../abstracts/functions' as FN;
|
|
6
7
|
@use './container-queries' as Q;
|
|
7
8
|
@use './media-queries' as MQ;
|
|
8
9
|
|
|
9
|
-
@mixin width($value) { width: $value; }
|
|
10
|
-
@mixin height($value) { height: $value; }
|
|
11
|
-
@mixin min-width($value) { min-width: $value; }
|
|
12
|
-
@mixin min-height($value) { min-height: $value; }
|
|
13
|
-
@mixin max-width($value) { max-width: $value; }
|
|
14
|
-
@mixin max-height($value) { max-height: $value; }
|
|
15
|
-
|
|
10
|
+
@mixin width($value) { width: FN.fix-units($value); }
|
|
11
|
+
@mixin height($value) { height: FN.fix-units($value); }
|
|
12
|
+
@mixin min-width($value) { min-width: FN.fix-units($value); }
|
|
13
|
+
@mixin min-height($value) { min-height: FN.fix-units($value); }
|
|
14
|
+
@mixin max-width($value) { max-width: FN.fix-units($value); }
|
|
15
|
+
@mixin max-height($value) { max-height: FN.fix-units($value); }
|
|
16
|
+
.widthx { @include width(100%); }
|
|
16
17
|
@mixin width-percent($i) { width: str.unquote($i + '%'); }
|
|
17
18
|
@mixin height-percent($i) { height: str.unquote($i + '%'); }
|
|
18
19
|
@mixin min-width-percent($i) { min-width: str.unquote($i + '%'); }
|
|
@@ -68,8 +69,13 @@
|
|
|
68
69
|
|
|
69
70
|
// Generate utilities from spacing map
|
|
70
71
|
@each $key, $value in VAR.$spacings {
|
|
71
|
-
.w-#{$key}
|
|
72
|
-
.
|
|
72
|
+
.w-#{$key},
|
|
73
|
+
.hover\:w-#{$key}:hover,
|
|
74
|
+
.group:hover .group-hover\:w-#{$key} { @include width($value); }
|
|
75
|
+
.h-#{$key},
|
|
76
|
+
.hover\:h-#{$key}:hover,
|
|
77
|
+
.group:hover .group-hover\:h-#{$key} { @include height($value); }
|
|
78
|
+
|
|
73
79
|
.min-w-#{$key} { @include min-width($value); }
|
|
74
80
|
.min-h-#{$key} { @include min-height($value); }
|
|
75
81
|
.max-w-#{$key} { @include max-width($value); }
|
|
@@ -96,8 +102,13 @@
|
|
|
96
102
|
@include MQ.media-up ($breakpoint) {
|
|
97
103
|
// Generate utilities from spacing map
|
|
98
104
|
@each $i in VAR.$percentages {
|
|
99
|
-
.w-#{$i}
|
|
100
|
-
.
|
|
105
|
+
.w-#{$i}\@#{$breakpoint},
|
|
106
|
+
.hover\:w-#{$i}\@#{$breakpoint}:hover,
|
|
107
|
+
.group:hover .group-hover\:w-#{$i}\@#{$breakpoint} { @include width($i); }
|
|
108
|
+
.h-#{$i}\@#{$breakpoint},
|
|
109
|
+
.hover\:h-#{$i}\@#{$breakpoint}:hover,
|
|
110
|
+
.group:hover .group-hover\:h-#{$i}\@#{$breakpoint} { @include height($i); }
|
|
111
|
+
|
|
101
112
|
.min-w-#{$i}p\@#{$breakpoint} { @include min-width-percent($i); }
|
|
102
113
|
.min-h-#{$i}p\@#{$breakpoint} { @include min-height-percent($i); }
|
|
103
114
|
.max-w-#{$i}p\@#{$breakpoint} { @include max-width-percent($i); }
|
|
@@ -105,8 +116,14 @@
|
|
|
105
116
|
}
|
|
106
117
|
|
|
107
118
|
@each $key, $value in VAR.$spacings {
|
|
108
|
-
.w-#{$key}\@#{$breakpoint}
|
|
109
|
-
.
|
|
119
|
+
.w-#{$key}\@#{$breakpoint},
|
|
120
|
+
.hover\:w-#{$key}\@#{$breakpoint}:hover,
|
|
121
|
+
.group:hover .group-hover\:w-#{$key}\@#{$breakpoint} { @include width($value); }
|
|
122
|
+
.h-#{$key}\@#{$breakpoint},
|
|
123
|
+
.hover\:h-#{$key}\@#{$breakpoint}:hover,
|
|
124
|
+
.group:hover .group-hover\:h-#{$key}\@#{$breakpoint} { @include height($value); }
|
|
125
|
+
|
|
126
|
+
|
|
110
127
|
.min-w-#{$key}\@#{$breakpoint} { @include min-width($value); }
|
|
111
128
|
.min-h-#{$key}\@#{$breakpoint} { @include min-height($value); }
|
|
112
129
|
.max-w-#{$key}\@#{$breakpoint} { @include max-width($value); }
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@use 'sass:string';
|
|
3
3
|
@use 'sass:meta';
|
|
4
4
|
@use '../abstracts' as *;
|
|
5
|
+
@use '../abstracts/functions' as FN;
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -73,40 +74,6 @@
|
|
|
73
74
|
* @see flex, grid, display
|
|
74
75
|
*/
|
|
75
76
|
|
|
76
|
-
// -----------------------------------------------
|
|
77
|
-
// HELPER FUNCTIONS
|
|
78
|
-
// -----------------------------------------------
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* @function format-unit-value
|
|
82
|
-
* @description Ensures values have appropriate units
|
|
83
|
-
* @param {Number|String} $value - The value to format
|
|
84
|
-
* @returns {Number|String} Value with appropriate units
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
@function format-unit-value($value) {
|
|
89
|
-
// Zero check
|
|
90
|
-
@if $value == 0 {
|
|
91
|
-
@return 0;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// If pure number (no units), add px
|
|
95
|
-
@if meta.type-of($value) == 'number' and math.unit($value) == "" {
|
|
96
|
-
@return $value * 1px; // Multiply by 1px instead of adding px
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// If number with units (like rem), return as is
|
|
100
|
-
@if meta.type-of($value) == 'number' and math.unit($value) != "" {
|
|
101
|
-
@return $value; // Already has units, return as is
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// Convert value to string for unit checking
|
|
105
|
-
$value-str: if(meta.type-of($value) == 'string', string.unquote($value), #{$value});
|
|
106
|
-
|
|
107
|
-
@return $value-str;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
77
|
|
|
111
78
|
// -----------------------------------------------
|
|
112
79
|
// PADDING MIXINS
|
|
@@ -117,7 +84,7 @@
|
|
|
117
84
|
* @description Sets padding on all sides
|
|
118
85
|
* @param {Number|String} $val - Padding value
|
|
119
86
|
*/
|
|
120
|
-
@mixin p($val) { padding:
|
|
87
|
+
@mixin p($val) { padding: FN.fix-units($val); }
|
|
121
88
|
|
|
122
89
|
/**
|
|
123
90
|
* @mixin px
|
|
@@ -125,7 +92,7 @@
|
|
|
125
92
|
* @param {Number|String} $val - Padding value
|
|
126
93
|
*/
|
|
127
94
|
@mixin px($val) {
|
|
128
|
-
$val:
|
|
95
|
+
$val: FN.fix-units($val);
|
|
129
96
|
|
|
130
97
|
padding-inline: $val;
|
|
131
98
|
}
|
|
@@ -136,7 +103,7 @@
|
|
|
136
103
|
* @param {Number|String} $val - Padding value
|
|
137
104
|
*/
|
|
138
105
|
@mixin py($val) {
|
|
139
|
-
$val:
|
|
106
|
+
$val: FN.fix-units($val);
|
|
140
107
|
|
|
141
108
|
padding-block: $val;
|
|
142
109
|
}
|
|
@@ -147,7 +114,7 @@
|
|
|
147
114
|
* @param {Number|String} $val - Padding value
|
|
148
115
|
*/
|
|
149
116
|
@mixin pt($val) {
|
|
150
|
-
$val:
|
|
117
|
+
$val: FN.fix-units($val);
|
|
151
118
|
|
|
152
119
|
padding-top: $val;
|
|
153
120
|
}
|
|
@@ -158,7 +125,7 @@
|
|
|
158
125
|
* @param {Number|String} $val - Padding value
|
|
159
126
|
*/
|
|
160
127
|
@mixin pr($val) {
|
|
161
|
-
$val:
|
|
128
|
+
$val: FN.fix-units($val);
|
|
162
129
|
|
|
163
130
|
padding-right: $val;
|
|
164
131
|
}
|
|
@@ -169,7 +136,7 @@
|
|
|
169
136
|
* @param {Number|String} $val - Padding value
|
|
170
137
|
*/
|
|
171
138
|
@mixin pb($val) {
|
|
172
|
-
$val:
|
|
139
|
+
$val: FN.fix-units($val);
|
|
173
140
|
|
|
174
141
|
padding-bottom: $val;
|
|
175
142
|
}
|
|
@@ -180,7 +147,7 @@
|
|
|
180
147
|
* @param {Number|String} $val - Padding value
|
|
181
148
|
*/
|
|
182
149
|
@mixin pl($val) {
|
|
183
|
-
$val:
|
|
150
|
+
$val: FN.fix-units($val);
|
|
184
151
|
|
|
185
152
|
padding-left: $val;
|
|
186
153
|
}
|
|
@@ -195,7 +162,7 @@
|
|
|
195
162
|
* @param {Number|String} $val - Margin value
|
|
196
163
|
*/
|
|
197
164
|
@mixin m($val) {
|
|
198
|
-
$val:
|
|
165
|
+
$val: FN.fix-units($val);
|
|
199
166
|
|
|
200
167
|
margin: $val;
|
|
201
168
|
}
|
|
@@ -206,7 +173,7 @@
|
|
|
206
173
|
* @param {Number|String} $val - Margin value
|
|
207
174
|
*/
|
|
208
175
|
@mixin mx($val) {
|
|
209
|
-
$val:
|
|
176
|
+
$val: FN.fix-units($val);
|
|
210
177
|
|
|
211
178
|
margin-inline: $val;
|
|
212
179
|
}
|
|
@@ -217,7 +184,7 @@
|
|
|
217
184
|
* @param {Number|String} $val - Margin value
|
|
218
185
|
*/
|
|
219
186
|
@mixin my($val) {
|
|
220
|
-
$val:
|
|
187
|
+
$val: FN.fix-units($val);
|
|
221
188
|
|
|
222
189
|
margin-block: $val;
|
|
223
190
|
}
|
|
@@ -228,7 +195,7 @@
|
|
|
228
195
|
* @param {Number|String} $val - Margin value
|
|
229
196
|
*/
|
|
230
197
|
@mixin mt($val) {
|
|
231
|
-
$val:
|
|
198
|
+
$val: FN.fix-units($val);
|
|
232
199
|
|
|
233
200
|
margin-top: $val;
|
|
234
201
|
}
|
|
@@ -239,7 +206,7 @@
|
|
|
239
206
|
* @param {Number|String} $val - Margin value
|
|
240
207
|
*/
|
|
241
208
|
@mixin mr($val) {
|
|
242
|
-
$val:
|
|
209
|
+
$val: FN.fix-units($val);
|
|
243
210
|
|
|
244
211
|
margin-right: $val;
|
|
245
212
|
}
|
|
@@ -250,7 +217,7 @@
|
|
|
250
217
|
* @param {Number|String} $val - Margin value
|
|
251
218
|
*/
|
|
252
219
|
@mixin mb($val) {
|
|
253
|
-
$val:
|
|
220
|
+
$val: FN.fix-units($val);
|
|
254
221
|
|
|
255
222
|
margin-bottom: $val;
|
|
256
223
|
}
|
|
@@ -261,7 +228,7 @@
|
|
|
261
228
|
* @param {Number|String} $val - Margin value
|
|
262
229
|
*/
|
|
263
230
|
@mixin ml($val) {
|
|
264
|
-
$val:
|
|
231
|
+
$val: FN.fix-units($val);
|
|
265
232
|
|
|
266
233
|
margin-left: $val;
|
|
267
234
|
}
|
|
@@ -285,6 +252,71 @@
|
|
|
285
252
|
@mixin mx-auto { @include ml-auto; @include mr-auto; }
|
|
286
253
|
|
|
287
254
|
|
|
255
|
+
// -----------------------------------------------
|
|
256
|
+
// INSET MIXINS
|
|
257
|
+
// -----------------------------------------------
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @mixin inset
|
|
261
|
+
* @description Sets all inset properties (top, right, bottom, left)
|
|
262
|
+
* @param {Number|String} $val - Inset value
|
|
263
|
+
*/
|
|
264
|
+
@mixin inset($val) {
|
|
265
|
+
$val: FN.fix-units($val);
|
|
266
|
+
|
|
267
|
+
inset: $val;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* @mixin inset-x
|
|
272
|
+
* @description Sets horizontal inset properties (left and right)
|
|
273
|
+
* @param {Number|String} $val - Inset value
|
|
274
|
+
*/
|
|
275
|
+
@mixin inset-x($val) {
|
|
276
|
+
$val: FN.fix-units($val);
|
|
277
|
+
|
|
278
|
+
left: $val;
|
|
279
|
+
right: $val;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* @mixin inset-y
|
|
284
|
+
* @description Sets vertical inset properties (top and bottom)
|
|
285
|
+
* @param {Number|String} $val - Inset value
|
|
286
|
+
*/
|
|
287
|
+
@mixin inset-y($val) {
|
|
288
|
+
$val: FN.fix-units($val);
|
|
289
|
+
|
|
290
|
+
top: $val;
|
|
291
|
+
bottom: $val;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @mixin inset-auto
|
|
296
|
+
* @description Sets all inset properties to auto
|
|
297
|
+
*/
|
|
298
|
+
@mixin inset-auto {
|
|
299
|
+
inset: auto;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @mixin inset-x-auto
|
|
304
|
+
* @description Sets horizontal inset properties to auto
|
|
305
|
+
*/
|
|
306
|
+
@mixin inset-x-auto {
|
|
307
|
+
left: auto;
|
|
308
|
+
right: auto;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* @mixin inset-y-auto
|
|
313
|
+
* @description Sets vertical inset properties to auto
|
|
314
|
+
*/
|
|
315
|
+
@mixin inset-y-auto {
|
|
316
|
+
top: auto;
|
|
317
|
+
bottom: auto;
|
|
318
|
+
}
|
|
319
|
+
|
|
288
320
|
// -----------------------------------------------
|
|
289
321
|
// SPACING MIXINS
|
|
290
322
|
// -----------------------------------------------
|
|
@@ -296,7 +328,7 @@
|
|
|
296
328
|
*/
|
|
297
329
|
@mixin space-y($i) {
|
|
298
330
|
& > * + * {
|
|
299
|
-
$i:
|
|
331
|
+
$i: FN.fix-units($i);
|
|
300
332
|
|
|
301
333
|
margin-top: $i;
|
|
302
334
|
}
|
|
@@ -309,7 +341,7 @@
|
|
|
309
341
|
*/
|
|
310
342
|
@mixin space-x($i) {
|
|
311
343
|
& > * + * {
|
|
312
|
-
$i:
|
|
344
|
+
$i: FN.fix-units($i);
|
|
313
345
|
|
|
314
346
|
margin-left: $i;
|
|
315
347
|
}
|
|
@@ -324,21 +356,21 @@
|
|
|
324
356
|
* @description Sets gap between grid/flex children
|
|
325
357
|
* @param {Number|String} $val - Gap value
|
|
326
358
|
*/
|
|
327
|
-
@mixin gap($val) { $val:
|
|
359
|
+
@mixin gap($val) { $val: FN.fix-units($val); gap: $val; }
|
|
328
360
|
|
|
329
361
|
/**
|
|
330
362
|
* @mixin gap-x
|
|
331
363
|
* @description Sets horizontal gap between grid/flex children
|
|
332
364
|
* @param {Number|String} $val - Gap value
|
|
333
365
|
*/
|
|
334
|
-
@mixin gap-x($val) { $val:
|
|
366
|
+
@mixin gap-x($val) { $val: FN.fix-units($val); column-gap: $val; }
|
|
335
367
|
|
|
336
368
|
/**
|
|
337
369
|
* @mixin gap-y
|
|
338
370
|
* @description Sets vertical gap between grid/flex children
|
|
339
371
|
* @param {Number|String} $val - Gap value
|
|
340
372
|
*/
|
|
341
|
-
@mixin gap-y($val) { $val:
|
|
373
|
+
@mixin gap-y($val) { $val: FN.fix-units($val); row-gap: $val; }
|
|
342
374
|
|
|
343
375
|
@if $generate-utility-classes {
|
|
344
376
|
// -----------------------------------------------
|
|
@@ -355,6 +387,12 @@
|
|
|
355
387
|
|
|
356
388
|
.gap-auto { gap: auto; }
|
|
357
389
|
|
|
390
|
+
// Auto inset utility classes
|
|
391
|
+
.inset-auto { @include inset-auto; }
|
|
392
|
+
.inset-x-auto { @include inset-x-auto; }
|
|
393
|
+
.inset-y-auto { @include inset-y-auto; }
|
|
394
|
+
|
|
395
|
+
|
|
358
396
|
// -----------------------------------------------
|
|
359
397
|
// SPACING CLASSES
|
|
360
398
|
// -----------------------------------------------
|
|
@@ -386,6 +424,11 @@
|
|
|
386
424
|
// Space classes
|
|
387
425
|
.space-x-#{$key} { @include space-x($value); }
|
|
388
426
|
.space-y-#{$key} { @include space-y($value); }
|
|
427
|
+
|
|
428
|
+
.inset-#{$key} { @include inset($value); }
|
|
429
|
+
.inset-x-#{$key} { @include inset-x($value); }
|
|
430
|
+
.inset-y-#{$key} { @include inset-y($value); }
|
|
431
|
+
|
|
389
432
|
}
|
|
390
433
|
|
|
391
434
|
|
|
@@ -398,6 +441,9 @@
|
|
|
398
441
|
.mx-auto\@#{$breakpoint} { @include mx-auto; }
|
|
399
442
|
.ml-auto\@#{$breakpoint} { @include ml-auto; }
|
|
400
443
|
.mr-auto\@#{$breakpoint} { @include mr-auto; }
|
|
444
|
+
.inset-auto\@#{$breakpoint} { @include inset-auto; }
|
|
445
|
+
.inset-x-auto\@#{$breakpoint} { @include inset-x-auto; }
|
|
446
|
+
.inset-y-auto\@#{$breakpoint} { @include inset-y-auto; }
|
|
401
447
|
|
|
402
448
|
// Generate utilities from spacing map
|
|
403
449
|
@each $key, $value in $spacings {
|
|
@@ -426,6 +472,10 @@
|
|
|
426
472
|
// Space classes
|
|
427
473
|
.space-x-#{$key}\@#{$breakpoint} { @include space-x($value); }
|
|
428
474
|
.space-y-#{$key}\@#{$breakpoint} { @include space-y($value); }
|
|
475
|
+
.inset-#{$key}\@#{$breakpoint} { @include inset($value); }
|
|
476
|
+
.inset-x-#{$key}\@#{$breakpoint} { @include inset-x($value); }
|
|
477
|
+
.inset-y-#{$key}\@#{$breakpoint} { @include inset-y($value); }
|
|
478
|
+
|
|
429
479
|
}
|
|
430
480
|
}
|
|
431
481
|
}
|