@nuvoui/core 1.1.7 → 1.1.8
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.min.css +1 -1
- package/package.json +1 -1
- package/src/styles/index.scss +2 -0
- package/src/styles/layouts/_container.scss +20 -9
- package/src/styles/layouts/_flex.scss +56 -15
- package/src/styles/layouts/_grid.scss +65 -25
- package/src/styles/mixins-map.scss +254 -0
- package/src/styles/utilities/_alignment.scss +20 -0
- package/src/styles/utilities/_container-queries.scss +40 -0
- package/src/styles/utilities/_display.scss +55 -1
- package/src/styles/utilities/_media-queries.scss +11 -10
- package/src/styles/utilities/_opacity.scss +85 -1
- package/src/styles/utilities/_position.scss +176 -70
- package/src/styles/utilities/_shadows.scss +81 -6
- package/src/styles/utilities/_sizing.scss +52 -48
- package/src/styles/utilities/_spacing.scss +313 -62
- package/src/styles/utilities/_transitions.scss +152 -0
- package/src/styles/utilities/_typography.scss +112 -88
- package/src/styles/utilities/_variables.scss +40 -12
|
@@ -1,12 +1,85 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Section: Presentation
|
|
2
|
+
// Module: Opacity
|
|
2
3
|
|
|
3
4
|
@use 'sass:math';
|
|
4
5
|
@use './variables' as *;
|
|
5
6
|
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @component Opacity
|
|
11
|
+
* @description Controls element transparency with customizable opacity values and interactive states
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <!-- Basic opacity -->
|
|
15
|
+
* <div class="opacity-50">This element has 50% opacity</div>
|
|
16
|
+
*
|
|
17
|
+
* <!-- Responsive opacity -->
|
|
18
|
+
* <div class="opacity-100 opacity-50@md">
|
|
19
|
+
* 100% opacity by default, 50% on medium screens and up
|
|
20
|
+
* </div>
|
|
21
|
+
*
|
|
22
|
+
* <!-- Interactive states -->
|
|
23
|
+
* <div class="opacity-50 hover:opacity-100">
|
|
24
|
+
* 50% opacity, becomes fully visible on hover
|
|
25
|
+
* </div>
|
|
26
|
+
*
|
|
27
|
+
* <button class="opacity-70 focus:opacity-100">
|
|
28
|
+
* 70% opacity, fully visible when focused
|
|
29
|
+
* </button>
|
|
30
|
+
*
|
|
31
|
+
* <div class="opacity-75 active:opacity-100">
|
|
32
|
+
* 75% opacity, fully visible when clicked/active
|
|
33
|
+
* </div>
|
|
34
|
+
*
|
|
35
|
+
* <!-- Group hover effect -->
|
|
36
|
+
* <div class="group">
|
|
37
|
+
* <h3>Parent element with "group" class</h3>
|
|
38
|
+
* <div class="opacity-0 group-hover:opacity-100">
|
|
39
|
+
* Hidden by default, visible when parent is hovered
|
|
40
|
+
* </div>
|
|
41
|
+
* </div>
|
|
42
|
+
*
|
|
43
|
+
* <!-- With transition -->
|
|
44
|
+
* <div class="opacity-50 hover:opacity-100 transition-opacity">
|
|
45
|
+
* Smooth opacity transition on hover
|
|
46
|
+
* </div>
|
|
47
|
+
*
|
|
48
|
+
* @classes
|
|
49
|
+
* Base:
|
|
50
|
+
* - opacity-{value}: Sets element opacity (0-100%)
|
|
51
|
+
* Values: 0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100
|
|
52
|
+
*
|
|
53
|
+
* Interactive States:
|
|
54
|
+
* - hover:opacity-{value}: Changes opacity on mouse hover
|
|
55
|
+
* - focus:opacity-{value}: Changes opacity when element receives focus
|
|
56
|
+
* - active:opacity-{value}: Changes opacity when element is active/pressed
|
|
57
|
+
* - group-hover:opacity-{value}: Changes opacity when parent with .group class is hovered
|
|
58
|
+
*
|
|
59
|
+
* Animation:
|
|
60
|
+
* - transition-opacity: Adds smooth transition when opacity changes
|
|
61
|
+
*
|
|
62
|
+
* @responsive
|
|
63
|
+
* All opacity classes support responsive variants using @breakpoint suffix:
|
|
64
|
+
* - opacity-50@sm: 50% opacity on small screens and up
|
|
65
|
+
* - hover:opacity-100@md: Full opacity on hover for medium screens and up
|
|
66
|
+
*
|
|
67
|
+
* Available breakpoints: xs, sm, md, lg, xl, xxl
|
|
68
|
+
*
|
|
69
|
+
* @customization
|
|
70
|
+
* Opacity values are defined in the $percentages variable
|
|
71
|
+
* Transition timing can be customized via CSS variables
|
|
72
|
+
*
|
|
73
|
+
* @see transitions
|
|
74
|
+
*/
|
|
75
|
+
|
|
6
76
|
// Opacity Utilities
|
|
7
77
|
@each $i in $percentages {
|
|
8
78
|
.opacity-#{$i} { opacity: math.div($i, 100); }
|
|
9
79
|
.hover\:opacity-#{$i}:hover { opacity: math.div($i, 100); }
|
|
80
|
+
.focus\:opacity-#{$i}:focus { opacity: math.div($i, 100); }
|
|
81
|
+
.active\:opacity-#{$i}:active { opacity: math.div($i, 100); }
|
|
82
|
+
.group:hover .group-hover\:opacity-#{$i} { opacity: math.div($i, 100); }
|
|
10
83
|
}
|
|
11
84
|
|
|
12
85
|
// Responsive Variants for Opacity
|
|
@@ -15,6 +88,17 @@
|
|
|
15
88
|
@each $i in $percentages {
|
|
16
89
|
.opacity-#{$i}\@#{$breakpoint} { opacity: math.div($i, 100); }
|
|
17
90
|
.hover\:opacity-#{$i}\@#{$breakpoint}:hover { opacity: math.div($i, 100); }
|
|
91
|
+
.focus\:opacity-#{$i}\@#{$breakpoint}:focus { opacity: math.div($i, 100); }
|
|
92
|
+
.active\:opacity-#{$i}\@#{$breakpoint}:active { opacity: math.div($i, 100); }
|
|
93
|
+
.group:hover .group-hover\:opacity-#{$i}\@#{$breakpoint} { opacity: math.div($i, 100); }
|
|
18
94
|
}
|
|
19
95
|
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Transition Opacity
|
|
99
|
+
// TODO move to transitons may be?
|
|
100
|
+
.transition-opacity {
|
|
101
|
+
transition-property: opacity;
|
|
102
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
103
|
+
transition-duration: 150ms;
|
|
20
104
|
}
|
|
@@ -1,106 +1,212 @@
|
|
|
1
1
|
@use './variables' as *;
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @component Position
|
|
5
|
+
* @description Controls element positioning and placement within the document flow
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <!-- Basic positioning -->
|
|
9
|
+
* <div class="relative">
|
|
10
|
+
* <div class="absolute top-0 right-0">
|
|
11
|
+
* Positioned in top-right corner
|
|
12
|
+
* </div>
|
|
13
|
+
* </div>
|
|
14
|
+
*
|
|
15
|
+
* <!-- Sticky header -->
|
|
16
|
+
* <header class="sticky top-0">
|
|
17
|
+
* This header sticks to the top when scrolling
|
|
18
|
+
* </header>
|
|
19
|
+
*
|
|
20
|
+
* <!-- Responsive positioning -->
|
|
21
|
+
* <div class="relative@md">
|
|
22
|
+
* <div class="absolute@md top-2 left-2">
|
|
23
|
+
* Only positioned on medium screens and up
|
|
24
|
+
* </div>
|
|
25
|
+
* </div>
|
|
26
|
+
*
|
|
27
|
+
* @classes
|
|
28
|
+
* Position Types:
|
|
29
|
+
* - static: Default position, follows document flow
|
|
30
|
+
* - relative: Positioned relative to normal position
|
|
31
|
+
* - absolute: Positioned relative to nearest positioned ancestor
|
|
32
|
+
* - fixed: Positioned relative to viewport
|
|
33
|
+
* - sticky: Positioned based on scroll position
|
|
34
|
+
*
|
|
35
|
+
* Placement:
|
|
36
|
+
* - top-{value}: Sets top position
|
|
37
|
+
* - right-{value}: Sets right position
|
|
38
|
+
* - bottom-{value}: Sets bottom position
|
|
39
|
+
* - left-{value}: Sets left position
|
|
40
|
+
*
|
|
41
|
+
* Common values: 0, 1, 2, 3, 4, 5, 10, etc. (based on spacing scale)
|
|
42
|
+
*
|
|
43
|
+
* @responsive
|
|
44
|
+
* All position classes support responsive variants using @breakpoint suffix:
|
|
45
|
+
* - relative@md: Relative positioning on medium screens and up
|
|
46
|
+
* - top-0@lg: Zero top position on large screens
|
|
47
|
+
*
|
|
48
|
+
* @see z-index, transform
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
//-----------------------------------------------
|
|
53
|
+
// MIXINS
|
|
54
|
+
//-----------------------------------------------
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @mixin static
|
|
59
|
+
* @description Sets position to static (default document flow)
|
|
60
|
+
* @example
|
|
61
|
+
* .element {
|
|
62
|
+
* @include static;
|
|
63
|
+
* }
|
|
64
|
+
*/
|
|
4
65
|
@mixin static {
|
|
5
66
|
position: static;
|
|
6
67
|
}
|
|
7
68
|
|
|
69
|
+
/**
|
|
70
|
+
* @mixin relative
|
|
71
|
+
* @description Sets position to relative, creating a positioning context
|
|
72
|
+
* @example
|
|
73
|
+
* .container {
|
|
74
|
+
* @include relative;
|
|
75
|
+
* }
|
|
76
|
+
*/
|
|
8
77
|
@mixin relative {
|
|
9
78
|
position: relative;
|
|
10
79
|
}
|
|
11
80
|
|
|
81
|
+
/**
|
|
82
|
+
* @mixin absolute
|
|
83
|
+
* @description Sets position to absolute, removing from normal document flow
|
|
84
|
+
* @example
|
|
85
|
+
* .popup {
|
|
86
|
+
* @include absolute;
|
|
87
|
+
* top: 0;
|
|
88
|
+
* left: 0;
|
|
89
|
+
* }
|
|
90
|
+
*/
|
|
12
91
|
@mixin absolute {
|
|
13
92
|
position: absolute;
|
|
14
93
|
}
|
|
15
94
|
|
|
95
|
+
/**
|
|
96
|
+
* @mixin absolute
|
|
97
|
+
* @description Sets position to absolute, removing from normal document flow
|
|
98
|
+
* @example
|
|
99
|
+
* .popup {
|
|
100
|
+
* @include absolute;
|
|
101
|
+
* top: 0;
|
|
102
|
+
* left: 0;
|
|
103
|
+
* }
|
|
104
|
+
*/
|
|
16
105
|
@mixin fixed {
|
|
17
106
|
position: fixed;
|
|
18
107
|
}
|
|
19
108
|
|
|
109
|
+
/**
|
|
110
|
+
* @mixin sticky
|
|
111
|
+
* @description Creates a sticky element that remains in view during scrolling
|
|
112
|
+
* @example
|
|
113
|
+
* .nav {
|
|
114
|
+
* @include sticky;
|
|
115
|
+
* }
|
|
116
|
+
*/
|
|
20
117
|
@mixin sticky {
|
|
21
118
|
position: sticky;
|
|
22
119
|
z-index: 999;
|
|
23
120
|
top: 0;
|
|
24
121
|
}
|
|
25
122
|
|
|
26
|
-
// Position Classes
|
|
27
|
-
.static {
|
|
28
|
-
@include static;
|
|
29
|
-
}
|
|
30
123
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
@
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
@
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
@
|
|
71
|
-
|
|
72
|
-
|
|
124
|
+
/**
|
|
125
|
+
* @mixin top
|
|
126
|
+
* @description Sets the top position of an element
|
|
127
|
+
* @param {Number|Length} $value - Position value (in px, rem, etc.)
|
|
128
|
+
* @example
|
|
129
|
+
* .toast {
|
|
130
|
+
* @include absolute;
|
|
131
|
+
* @include top(1rem);
|
|
132
|
+
* }
|
|
133
|
+
*/
|
|
134
|
+
@mixin top($value) {top: $value; }
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @mixin right
|
|
138
|
+
* @description Sets the right position of an element
|
|
139
|
+
* @param {Number|Length} $value - Position value (in px, rem, etc.)
|
|
140
|
+
* @example
|
|
141
|
+
* .badge {
|
|
142
|
+
* @include absolute;
|
|
143
|
+
* @include right(0);
|
|
144
|
+
* }
|
|
145
|
+
*/
|
|
146
|
+
@mixin right($value) {right: $value; }
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @mixin bottom
|
|
150
|
+
* @description Sets the bottom position of an element
|
|
151
|
+
* @param {Number|Length} $value - Position value (in px, rem, etc.)
|
|
152
|
+
* @example
|
|
153
|
+
* .footer {
|
|
154
|
+
* @include fixed;
|
|
155
|
+
* @include bottom(0);
|
|
156
|
+
* }
|
|
157
|
+
*/
|
|
158
|
+
@mixin bottom($value) {bottom: $value; }
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @mixin left
|
|
162
|
+
* @description Sets the left position of an element
|
|
163
|
+
* @param {Number|Length} $value - Position value (in px, rem, etc.)
|
|
164
|
+
* @example
|
|
165
|
+
* .sidebar {
|
|
166
|
+
* @include fixed;
|
|
167
|
+
* @include left(0);
|
|
168
|
+
* }
|
|
169
|
+
*/
|
|
170
|
+
@mixin left($value) {left: $value; }
|
|
73
171
|
|
|
74
|
-
@mixin right($value) {
|
|
75
|
-
right: if($value == 0, $value, $value + px);
|
|
76
|
-
}
|
|
77
172
|
|
|
78
|
-
@mixin bottom($value) {
|
|
79
|
-
bottom: if($value == 0, $value, $value + px);
|
|
80
|
-
}
|
|
81
173
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
174
|
+
//-----------------------------------------------
|
|
175
|
+
// UTILITY CLASSES
|
|
176
|
+
//-----------------------------------------------
|
|
85
177
|
|
|
86
|
-
//
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
178
|
+
// Position Classes
|
|
179
|
+
.static { @include static; }
|
|
180
|
+
.relative { @include relative; }
|
|
181
|
+
.absolute { @include absolute; }
|
|
182
|
+
.fixed { @include fixed; }
|
|
183
|
+
.sticky { @include sticky; }
|
|
184
|
+
|
|
185
|
+
// Placement Classes
|
|
186
|
+
@each $key, $value in $spacings {
|
|
187
|
+
.top-#{$key} { @include top($value); }
|
|
188
|
+
.right-#{$key} { @include right($value); }
|
|
189
|
+
.bottom-#{$key} { @include bottom($value); }
|
|
190
|
+
.left-#{$key} { @include left($value); }
|
|
92
191
|
}
|
|
93
192
|
|
|
193
|
+
//-----------------------------------------------
|
|
194
|
+
// RESPONSIVE CLASSES
|
|
195
|
+
//-----------------------------------------------
|
|
94
196
|
|
|
95
|
-
//
|
|
197
|
+
// Responsive Position Classes
|
|
96
198
|
@each $breakpoint, $width in $breakpoints {
|
|
97
199
|
@media (min-width: #{$width}) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
200
|
+
.static\@#{$breakpoint} {@include static;}
|
|
201
|
+
.relative\@#{$breakpoint} {@include relative;}
|
|
202
|
+
.absolute\@#{$breakpoint} {@include absolute;}
|
|
203
|
+
.fixed\@#{$breakpoint} {@include fixed;}
|
|
204
|
+
.sticky\@#{$breakpoint} {@include sticky;}
|
|
205
|
+
@each $key, $value in $spacings {
|
|
206
|
+
.top-#{$key}\@#{$breakpoint} {@include top($value);}
|
|
207
|
+
.right-#{$key}\@#{$breakpoint} {@include right($value);}
|
|
208
|
+
.bottom-#{$key}\@#{$breakpoint} {@include bottom($value);}
|
|
209
|
+
.left-#{$key}\@#{$breakpoint} {@include left($value);}
|
|
210
|
+
}
|
|
105
211
|
}
|
|
106
212
|
}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use 'sass:math';
|
|
4
4
|
@use 'sass:string';
|
|
5
|
-
@use './variables' as
|
|
6
|
-
|
|
5
|
+
@use './variables' as VAR;
|
|
7
6
|
|
|
8
7
|
// Shadow Variables
|
|
9
8
|
$shadow-colors: (
|
|
@@ -59,6 +58,15 @@ $shadow-sizes: (
|
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
@mixin shadow($size: 'md', $color: 'default') {
|
|
61
|
+
@if not map.has-key($shadow-sizes, $size) {
|
|
62
|
+
@warn "Shadow size '#{$size}' not found in $shadow-sizes map";
|
|
63
|
+
$size: 'md'; // Fallback to default
|
|
64
|
+
}
|
|
65
|
+
@if not map.has-key($shadow-colors, $color) {
|
|
66
|
+
@warn "Shadow color '#{$color}' not found in $shadow-colors map";
|
|
67
|
+
$color: 'default'; // Fallback to default
|
|
68
|
+
}
|
|
69
|
+
|
|
62
70
|
$shadow: map.get($shadow-sizes, $size);
|
|
63
71
|
$shadow-color: map.get($shadow-colors, $color);
|
|
64
72
|
@include shadow-base(
|
|
@@ -96,11 +104,78 @@ $shadow-sizes: (
|
|
|
96
104
|
.shadow-inset-#{$size} {
|
|
97
105
|
@include shadow-inset($size);
|
|
98
106
|
}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
// hover shadows
|
|
110
|
+
.hover\:shadow-#{$size}:hover {
|
|
111
|
+
@include shadow($size);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.hover\:shadow-#{$size}-dark:hover {
|
|
115
|
+
@include shadow($size, 'dark');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.hover\:shadow-inset-#{$size}:hover {
|
|
119
|
+
@include shadow-inset($size);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
// focus shadows
|
|
124
|
+
.focus\:shadow-#{$size}:hover {
|
|
125
|
+
@include shadow($size);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.focus\:shadow-#{$size}-dark:hover {
|
|
129
|
+
@include shadow($size, 'dark');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.focus\:shadow-inset-#{$size}:hover {
|
|
133
|
+
@include shadow-inset($size);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Active variants
|
|
138
|
+
@each $size, $values in $shadow-sizes {
|
|
139
|
+
.active\:shadow-#{$size}:active {
|
|
140
|
+
@include shadow($size);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Responsive variants
|
|
145
|
+
@each $breakpoint, $width in VAR.$breakpoints {
|
|
146
|
+
@media (min-width: #{$width}) {
|
|
147
|
+
// Regular shadows with breakpoints
|
|
148
|
+
@each $size, $values in $shadow-sizes {
|
|
149
|
+
.shadow-#{$size}\@#{$breakpoint} {
|
|
150
|
+
@include shadow($size);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Hover shadows with breakpoints
|
|
154
|
+
.hover\:shadow-#{$size}\@#{$breakpoint}:hover {
|
|
155
|
+
@include shadow($size);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Focus shadows with breakpoints
|
|
159
|
+
.focus\:shadow-#{$size}\@#{$breakpoint}:focus {
|
|
160
|
+
@include shadow($size);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
99
164
|
}
|
|
100
165
|
|
|
101
|
-
|
|
102
|
-
.
|
|
103
|
-
|
|
104
|
-
|
|
166
|
+
@for $i from 1 through 5 {
|
|
167
|
+
.elevation-#{$i} {
|
|
168
|
+
@if $i == 1 {
|
|
169
|
+
@include shadow('sm');
|
|
170
|
+
} @else if $i == 2 {
|
|
171
|
+
@include shadow('md');
|
|
172
|
+
} @else if $i == 3 {
|
|
173
|
+
@include shadow('lg');
|
|
174
|
+
} @else if $i == 4 {
|
|
175
|
+
@include shadow('xl');
|
|
176
|
+
} @else if $i == 5 {
|
|
177
|
+
@include shadow('monster');
|
|
178
|
+
}
|
|
179
|
+
z-index: $i;
|
|
105
180
|
}
|
|
106
181
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// _spacing.scss
|
|
2
2
|
|
|
3
3
|
@use 'sass:math';
|
|
4
|
-
@use './variables' as
|
|
4
|
+
@use './variables' as VAR;
|
|
5
5
|
@use './container-queries' as Q;
|
|
6
|
+
@use './media-queries' as MC;
|
|
6
7
|
|
|
7
8
|
@mixin width($value) { width: $value; }
|
|
8
9
|
@mixin height($value) { height: $value; }
|
|
@@ -11,13 +12,12 @@
|
|
|
11
12
|
@mixin max-width($value) { max-width: $value; }
|
|
12
13
|
@mixin max-height($value) { max-height: $value; }
|
|
13
14
|
|
|
14
|
-
@mixin width-percent($i) { width:
|
|
15
|
-
@mixin height-percent($i) { height:
|
|
16
|
-
@mixin min-width-percent($i) { min-width:
|
|
17
|
-
@mixin min-height-percent($i) { min-height:
|
|
18
|
-
@mixin max-width-percent($i) { max-width:
|
|
19
|
-
@mixin max-height-percent($i) { max-height:
|
|
20
|
-
|
|
15
|
+
@mixin width-percent($i) { width: $i + '%'; }
|
|
16
|
+
@mixin height-percent($i) { height: $i + '%'; }
|
|
17
|
+
@mixin min-width-percent($i) { min-width: $i + '%'; }
|
|
18
|
+
@mixin min-height-percent($i) { min-height: $i + '%'; }
|
|
19
|
+
@mixin max-width-percent($i) { max-width: $i + '%'; }
|
|
20
|
+
@mixin max-height-percent($i) { max-height: $i + '%'; }
|
|
21
21
|
|
|
22
22
|
@mixin w-auto { width: auto; }
|
|
23
23
|
@mixin w-full { width: 100%; }
|
|
@@ -28,64 +28,68 @@
|
|
|
28
28
|
@mixin min-h-full { min-height: 100%; }
|
|
29
29
|
@mixin max-h-full { max-height: 100%; }
|
|
30
30
|
|
|
31
|
+
@mixin w-screen { width: 100vw; }
|
|
32
|
+
@mixin h-screen { height: 100dvh; }
|
|
33
|
+
|
|
34
|
+
.w-screen { @include w-screen; }
|
|
35
|
+
.h-screen { @include h-screen; }
|
|
36
|
+
|
|
37
|
+
// Width utilities need :not(.flex) to avoid conflicts with flex child sizing
|
|
31
38
|
:not(.flex)>.w-auto { @include w-auto; }
|
|
32
39
|
:not(.flex)>.w-full { @include w-full; }
|
|
33
40
|
|
|
34
41
|
.h-auto { @include h-auto; }
|
|
35
42
|
.h-full { @include h-full; }
|
|
36
|
-
.min-w-full { @include min-w-full }
|
|
37
|
-
.max-w-full { @include max-w-full }
|
|
38
|
-
.min-h-full { @include min-h-full }
|
|
39
|
-
.max-h-full { @include max-h-full }
|
|
43
|
+
.min-w-full { @include min-w-full; }
|
|
44
|
+
.max-w-full { @include max-w-full; }
|
|
45
|
+
.min-h-full { @include min-h-full; }
|
|
46
|
+
.max-h-full { @include max-h-full; }
|
|
40
47
|
|
|
41
48
|
// Percentage widths
|
|
42
|
-
@each $i in
|
|
43
|
-
.w-#{$i}
|
|
44
|
-
.h-#{$i}
|
|
45
|
-
.min-w-#{$i}
|
|
46
|
-
.min-h-#{$i}
|
|
47
|
-
.max-w-#{$i}
|
|
48
|
-
.max-h-#{$i}
|
|
49
|
+
@each $i in VAR.$percentages {
|
|
50
|
+
.w-#{$i}p { @include width-percent($i); }
|
|
51
|
+
.h-#{$i}p { @include height-percent($i); }
|
|
52
|
+
.min-w-#{$i}p { @include min-width-percent($i); }
|
|
53
|
+
.min-h-#{$i}p { @include min-height-percent($i); }
|
|
54
|
+
.max-w-#{$i}p { @include max-width-percent($i); }
|
|
55
|
+
.max-h-#{$i}p { @include max-height-percent($i); }
|
|
49
56
|
}
|
|
50
57
|
|
|
51
58
|
// Generate utilities from spacing map
|
|
52
|
-
@each $
|
|
53
|
-
.w-#{$
|
|
54
|
-
.h-#{$
|
|
55
|
-
.min-w-#{$
|
|
56
|
-
.min-h-#{$
|
|
57
|
-
.max-w-#{$
|
|
58
|
-
.max-h-#{$
|
|
59
|
+
@each $key, $value in VAR.$spacings {
|
|
60
|
+
.w-#{$key} { @include width($value); }
|
|
61
|
+
.h-#{$key} { @include height($value); }
|
|
62
|
+
.min-w-#{$key} { @include min-width($value); }
|
|
63
|
+
.min-h-#{$key} { @include min-height($value); }
|
|
64
|
+
.max-w-#{$key} { @include max-width($value); }
|
|
65
|
+
.max-h-#{$key} { @include max-height($value); }
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
// Pixel widths based on spacing scale
|
|
62
|
-
@each $breakpoint, $width in
|
|
69
|
+
@each $breakpoint, $width in VAR.$breakpoints {
|
|
63
70
|
|
|
64
71
|
.w-#{$breakpoint} { @include width($width); }
|
|
65
|
-
.min-w-#{$breakpoint} { @include min-width($width) }
|
|
66
|
-
.max-w-#{$breakpoint} { @include max-width($width) }
|
|
72
|
+
.min-w-#{$breakpoint} { @include min-width($width); }
|
|
73
|
+
.max-w-#{$breakpoint} { @include max-width($width); }
|
|
67
74
|
|
|
68
|
-
@
|
|
69
|
-
.min-w-#{$breakpoint}\@#{$b} { @include min-width($width) }
|
|
70
|
-
.max-w-#{$breakpoint}\@#{$b} { @include max-width($width) }
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@include Q.container-up ($breakpoint) {
|
|
75
|
+
@include MC.media-up ($breakpoint) {
|
|
74
76
|
// Generate utilities from spacing map
|
|
77
|
+
@each $i in VAR.$percentages {
|
|
78
|
+
.w-#{$i}p\@#{$breakpoint} { @include width-percent($i); }
|
|
79
|
+
.h-#{$i}p\@#{$breakpoint} { @include height-percent($i); }
|
|
80
|
+
.min-w-#{$i}p\@#{$breakpoint} { @include min-width-percent($i); }
|
|
81
|
+
.min-h-#{$i}p\@#{$breakpoint} { @include min-height-percent($i); }
|
|
82
|
+
.max-w-#{$i}p\@#{$breakpoint} { @include max-width-percent($i); }
|
|
83
|
+
.max-h-#{$i}p\@#{$breakpoint} { @include max-height-percent($i); }
|
|
84
|
+
}
|
|
75
85
|
|
|
76
|
-
@each $
|
|
77
|
-
.w-#{$
|
|
78
|
-
.h-#{$
|
|
79
|
-
.min-w-#{$
|
|
80
|
-
.min-h-#{$
|
|
81
|
-
.max-w-#{$
|
|
82
|
-
.max-h-#{$
|
|
83
|
-
.w-#{$i}\@#{$breakpoint} { @include width($i); }
|
|
84
|
-
.h-#{$i}\@#{$breakpoint} { @include height($i); }
|
|
85
|
-
.min-w-#{$i}\@#{$breakpoint} { @include min-width($i) }
|
|
86
|
-
.min-h-#{$i}\@#{$breakpoint} { @include min-height($i) }
|
|
87
|
-
.max-w-#{$i}\@#{$breakpoint} { @include max-width($i) }
|
|
88
|
-
.max-h-#{$i}\@#{$breakpoint} { @include max-height($i) }
|
|
86
|
+
@each $key, $value in VAR.$spacings {
|
|
87
|
+
.w-#{$key}\@#{$breakpoint} { @include width($value); }
|
|
88
|
+
.h-#{$key}\@#{$breakpoint} { @include height($value); }
|
|
89
|
+
.min-w-#{$key}\@#{$breakpoint} { @include min-width($value); }
|
|
90
|
+
.min-h-#{$key}\@#{$breakpoint} { @include min-height($value); }
|
|
91
|
+
.max-w-#{$key}\@#{$breakpoint} { @include max-width($value); }
|
|
92
|
+
.max-h-#{$key}\@#{$breakpoint} { @include max-height($value); }
|
|
89
93
|
}
|
|
90
94
|
}
|
|
91
95
|
}
|