@nuvoui/core 1.2.2 → 1.2.4
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 +10759 -10520
- 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 +1 -1
- package/src/styles/abstracts/_config.scss +35 -54
- package/src/styles/abstracts/_index.scss +0 -1
- package/src/styles/base/_base.scss +4 -8
- package/src/styles/base/_index.scss +1 -1
- package/src/styles/base/_reset.scss +66 -31
- package/src/styles/index.scss +5 -2
- package/src/styles/layouts/_flex.scss +61 -46
- package/src/styles/layouts/_grid.scss +13 -13
- package/src/styles/mixins-map.scss +1 -1
- package/src/styles/themes/_theme.scss +144 -124
- package/src/styles/utilities/_alignment.scss +12 -12
- package/src/styles/utilities/_animations.scss +5 -9
- package/src/styles/utilities/_borders.scss +77 -80
- package/src/styles/utilities/_colors.scss +61 -65
- package/src/styles/utilities/_cursor.scss +23 -0
- package/src/styles/utilities/_index.scss +1 -0
- package/src/styles/utilities/_media-queries.scss +24 -15
- package/src/styles/utilities/_opacity.scss +14 -21
- package/src/styles/utilities/_position.scss +1 -3
- package/src/styles/utilities/_sizing.scss +92 -73
- package/src/styles/utilities/_spacing.scss +71 -101
- package/src/styles/utilities/_transitions.scss +4 -6
- package/src/styles/utilities/_typography.scss +92 -95
|
@@ -9,42 +9,42 @@
|
|
|
9
9
|
|
|
10
10
|
// Color Validation
|
|
11
11
|
@function is-valid-color($color) {
|
|
12
|
-
|
|
12
|
+
@return meta.type-of($color) == 'color';
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// Scale Generation Function
|
|
16
16
|
@function create-color-scale($color) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
$scale: map.set($scale, $shade, $adjusted-color);
|
|
17
|
+
$scale: ();
|
|
18
|
+
$stops: (
|
|
19
|
+
50: 95%,
|
|
20
|
+
100: 85%,
|
|
21
|
+
200: 75%,
|
|
22
|
+
300: 65%,
|
|
23
|
+
400: 55%,
|
|
24
|
+
500: 50%, // Base color
|
|
25
|
+
600: 45%,
|
|
26
|
+
700: 35%,
|
|
27
|
+
800: 25%,
|
|
28
|
+
900: 15%
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
@each $shade, $lightness in $stops {
|
|
32
|
+
$adjusted-color: $color;
|
|
33
|
+
|
|
34
|
+
@if $shade < 500 {
|
|
35
|
+
// Lighter shades: mix with white
|
|
36
|
+
$mix-percentage: math.div($lightness - 50%, 50%) * 100%;
|
|
37
|
+
$adjusted-color: color.mix(white, $color, $mix-percentage);
|
|
38
|
+
} @else if $shade > 500 {
|
|
39
|
+
// Darker shades: mix with black
|
|
40
|
+
$mix-percentage: math.div(50% - $lightness, 50%) * 100%;
|
|
41
|
+
$adjusted-color: color.mix(black, $color, $mix-percentage);
|
|
45
42
|
}
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
|
|
44
|
+
$scale: map.set($scale, $shade, $adjusted-color);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@return $scale;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// Luminance calculation for contrast
|
|
@@ -52,72 +52,68 @@
|
|
|
52
52
|
$red: math.div(color.channel($color, "red"), 255);
|
|
53
53
|
$green: math.div(color.channel($color, "green"), 255);
|
|
54
54
|
$blue: math.div(color.channel($color, "blue"), 255);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
|
|
56
|
+
$red: if($red <= 0.0393, math.div($red, 12.92), math.pow((math.div($red + 0.055, 1.055)), 2.4));
|
|
57
|
+
$green: if($green <= 0.0393, math.div($green, 12.92), math.pow((math.div($green + 0.055, 1.055)), 2.4));
|
|
58
|
+
$blue: if($blue <= 0.0393, math.div($blue, 12.92), math.pow((math.div($blue + 0.055, 1.055)), 2.4));
|
|
59
|
+
|
|
60
|
+
@return 0.2126 * $red + 0.7152 * $green + 0.0722 * $blue;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
// Find appropriate text color for a background
|
|
64
64
|
@function find-text-color($background) {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
$luminance: luminance($background);
|
|
66
|
+
@return if($luminance > 0.55, #000, #fff);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// Adaptive contrast mixin
|
|
70
70
|
@mixin adaptive-contrast($color) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
color.adjust($color, $lightness: -10%),
|
|
71
|
+
background-color: $color;
|
|
72
|
+
color: find-text-color($color);
|
|
73
|
+
|
|
74
|
+
@media (prefers-contrast: more) {
|
|
75
|
+
$adjusted: if(color.lightness($color) > 50%,
|
|
76
|
+
color.adjust($color, $lightness: -10%),
|
|
77
77
|
color.adjust($color, $lightness: 10%));
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
background-color: $adjusted;
|
|
80
|
+
color: find-text-color($adjusted);
|
|
81
|
+
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
// Generate color scales
|
|
85
85
|
$colors: (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
'primary': create-color-scale($primary),
|
|
87
|
+
'secondary': create-color-scale($secondary),
|
|
88
|
+
'success': create-color-scale($success),
|
|
89
|
+
'danger': create-color-scale($danger),
|
|
90
|
+
'warning': create-color-scale($warning),
|
|
91
|
+
'info': create-color-scale($info)
|
|
92
92
|
);
|
|
93
93
|
|
|
94
94
|
// Generate scales for primitives
|
|
95
95
|
$colors-primitives: ();
|
|
96
96
|
|
|
97
97
|
@each $name, $color in $color-primitives {
|
|
98
|
-
|
|
98
|
+
$colors-primitives: map.set($colors-primitives, $name, create-color-scale($color));
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
// todo: documentation
|
|
102
102
|
@mixin bg($color) {
|
|
103
|
-
|
|
104
|
-
background-color: $color;
|
|
105
|
-
}
|
|
103
|
+
background-color: $color;
|
|
106
104
|
}
|
|
107
105
|
@mixin color($color) {
|
|
108
|
-
|
|
109
|
-
color: $color;
|
|
110
|
-
}
|
|
106
|
+
color: $color;
|
|
111
107
|
}
|
|
112
108
|
@mixin gradient($direction, $colors...) {
|
|
113
|
-
|
|
109
|
+
background-image: linear-gradient($direction, $colors);
|
|
114
110
|
}
|
|
115
111
|
|
|
116
112
|
// Filter Mixins
|
|
117
113
|
@mixin backdrop-filter($value) {
|
|
118
|
-
|
|
114
|
+
backdrop-filter: $value;
|
|
119
115
|
}
|
|
120
116
|
|
|
121
117
|
@mixin filter($value) {
|
|
122
|
-
|
|
123
|
-
}
|
|
118
|
+
filter: $value;
|
|
119
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use '../abstracts' as VAR;
|
|
2
|
+
|
|
3
|
+
@mixin cursor($cursor-value) {
|
|
4
|
+
cursor: $cursor-value;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@if VAR.$generate-utility-classes {
|
|
8
|
+
.cursor-auto {@include cursor(auto);}
|
|
9
|
+
.cursor-pointer { @include cursor(pointer); }
|
|
10
|
+
.cursor-default { @include cursor(default); }
|
|
11
|
+
.cursor-move { @include cursor(move); }
|
|
12
|
+
.cursor-not-allowed { @include cursor(not-allowed); }
|
|
13
|
+
.cursor-wait { @include cursor(wait); }
|
|
14
|
+
.cursor-help { @include cursor(help); }
|
|
15
|
+
.cursor-text { @include cursor(text); }
|
|
16
|
+
.cursor-cell { @include cursor(cell); }
|
|
17
|
+
.cursor-crosshair { @include cursor(crosshair); }
|
|
18
|
+
.cursor-grabbing { @include cursor(grabbing); }
|
|
19
|
+
.cursor-grab { @include cursor(grab); }
|
|
20
|
+
.cursor-zoom-in { @include cursor(zoom-in); }
|
|
21
|
+
.cursor-zoom-out { @include cursor(zoom-out); }
|
|
22
|
+
.cursor-none { @include cursor(none); }
|
|
23
|
+
}
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
// todo: doc
|
|
76
77
|
// Touch devices
|
|
77
78
|
@mixin touch {
|
|
78
79
|
@media (hover: none) and (pointer: coarse) {
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
|
|
84
|
+
// todo: doc
|
|
83
85
|
// Print media
|
|
84
86
|
@mixin print {
|
|
85
87
|
@media print {
|
|
@@ -87,6 +89,7 @@
|
|
|
87
89
|
}
|
|
88
90
|
}
|
|
89
91
|
|
|
92
|
+
// todo: doc
|
|
90
93
|
// Example: @include supports(display: grid) { }
|
|
91
94
|
@mixin supports($property) {
|
|
92
95
|
@supports (#{$property}) {
|
|
@@ -94,6 +97,7 @@
|
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
99
|
|
|
100
|
+
// todo: doc
|
|
97
101
|
// System preference only
|
|
98
102
|
@mixin prefers-dark {
|
|
99
103
|
@media (prefers-color-scheme: dark) {
|
|
@@ -101,21 +105,25 @@
|
|
|
101
105
|
}
|
|
102
106
|
}
|
|
103
107
|
|
|
108
|
+
// todo: doc
|
|
104
109
|
// User preference takes precedence
|
|
105
110
|
@mixin dark-mode {
|
|
106
|
-
//
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Apply when system is dark AND user hasn't made a choice
|
|
112
|
-
@media (prefers-color-scheme: dark) {
|
|
113
|
-
[data-theme="system"] & {
|
|
111
|
+
@if $enable-dark-mode { // todo: documentation as this will fully remove the dark mode by force
|
|
112
|
+
// Apply when user explicitly chooses dark
|
|
113
|
+
[data-theme="dark"] & {
|
|
114
114
|
@content;
|
|
115
115
|
}
|
|
116
|
+
|
|
117
|
+
// Apply when system is dark AND user hasn't made a choice
|
|
118
|
+
@media (prefers-color-scheme: dark) {
|
|
119
|
+
[data-theme="system"] & {
|
|
120
|
+
@content;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
116
123
|
}
|
|
117
124
|
}
|
|
118
125
|
|
|
126
|
+
// todo: doc
|
|
119
127
|
// Device orientation
|
|
120
128
|
@mixin landscape {
|
|
121
129
|
@media screen and (orientation: landscape) {
|
|
@@ -123,17 +131,20 @@
|
|
|
123
131
|
}
|
|
124
132
|
}
|
|
125
133
|
|
|
134
|
+
// todo: doc
|
|
126
135
|
@mixin portrait {
|
|
127
136
|
@media screen and (orientation: portrait) {
|
|
128
137
|
@content;
|
|
129
138
|
}
|
|
130
139
|
}
|
|
131
140
|
|
|
141
|
+
// todo: doc
|
|
132
142
|
// Modern aspect ratio
|
|
133
143
|
@mixin aspect-ratio($ratio) {
|
|
134
144
|
aspect-ratio: #{$ratio};
|
|
135
145
|
}
|
|
136
146
|
|
|
147
|
+
// todo: doc
|
|
137
148
|
// Dynamic viewport units (modern browsers)
|
|
138
149
|
@mixin dvh {
|
|
139
150
|
@supports (height: 100dvh) {
|
|
@@ -145,24 +156,20 @@
|
|
|
145
156
|
}
|
|
146
157
|
}
|
|
147
158
|
|
|
159
|
+
// todo: doc
|
|
148
160
|
// Safe area insets (notches, home indicators)
|
|
149
161
|
@mixin safe-area-inset($property, $position) {
|
|
150
162
|
#{$property}: env(safe-area-inset-#{$position});
|
|
151
163
|
}
|
|
152
164
|
|
|
165
|
+
// todo: doc
|
|
153
166
|
@mixin reduced-motion {
|
|
154
167
|
@media (prefers-reduced-motion: reduce) {
|
|
155
168
|
@content;
|
|
156
169
|
}
|
|
157
170
|
}
|
|
158
171
|
|
|
159
|
-
//
|
|
160
|
-
@mixin save-data {
|
|
161
|
-
@media (prefers-reduced-data: reduce) {
|
|
162
|
-
@content;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
172
|
+
// todo: doc
|
|
166
173
|
// Mouse precision detection
|
|
167
174
|
@mixin fine-pointer {
|
|
168
175
|
@media (pointer: fine) {
|
|
@@ -170,6 +177,7 @@
|
|
|
170
177
|
}
|
|
171
178
|
}
|
|
172
179
|
|
|
180
|
+
// todo: doc
|
|
173
181
|
// Display mode for PWAs
|
|
174
182
|
@mixin display-mode($mode: "standalone") {
|
|
175
183
|
@media (display-mode: #{$mode}) {
|
|
@@ -177,6 +185,7 @@
|
|
|
177
185
|
}
|
|
178
186
|
}
|
|
179
187
|
|
|
188
|
+
// todo: doc
|
|
180
189
|
// High contrast mode
|
|
181
190
|
@mixin high-contrast {
|
|
182
191
|
@media (forced-colors: active) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Module: Opacity
|
|
3
3
|
|
|
4
4
|
@use "sass:math";
|
|
5
|
+
@use "sass:meta";
|
|
5
6
|
@use "../abstracts" as *;
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -68,30 +69,30 @@
|
|
|
68
69
|
* Opacity values are defined in the $percentages variable
|
|
69
70
|
* Transition timing can be customized via CSS variables
|
|
70
71
|
*
|
|
71
|
-
* @see transitions
|
|
72
|
+
* @see transitions
|
|
72
73
|
*/
|
|
73
74
|
|
|
74
75
|
@mixin opacity($value) {
|
|
75
|
-
opacity:
|
|
76
|
+
opacity: calc(#{$value} / 100);
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
@if $generate-utility-classes {
|
|
79
80
|
// Opacity Utilities
|
|
80
81
|
@each $i in $percentages {
|
|
81
82
|
.opacity-#{$i} {
|
|
82
|
-
@include opacity
|
|
83
|
+
@include opacity($i);
|
|
83
84
|
}
|
|
84
85
|
.hover\:opacity-#{$i}:hover {
|
|
85
|
-
@include opacity
|
|
86
|
+
@include opacity($i);
|
|
86
87
|
}
|
|
87
88
|
.focus\:opacity-#{$i}:focus {
|
|
88
|
-
@include opacity
|
|
89
|
+
@include opacity($i);
|
|
89
90
|
}
|
|
90
91
|
.active\:opacity-#{$i}:active {
|
|
91
|
-
@include opacity
|
|
92
|
+
@include opacity($i);
|
|
92
93
|
}
|
|
93
94
|
.group:hover .group-hover\:opacity-#{$i} {
|
|
94
|
-
@include opacity
|
|
95
|
+
@include opacity($i);
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
|
|
@@ -100,29 +101,21 @@
|
|
|
100
101
|
@media (min-width: #{$width}) {
|
|
101
102
|
@each $i in $percentages {
|
|
102
103
|
.opacity-#{$i}\@#{$breakpoint} {
|
|
103
|
-
@include opacity
|
|
104
|
+
@include opacity($i);
|
|
104
105
|
}
|
|
105
106
|
.hover\:opacity-#{$i}\@#{$breakpoint}:hover {
|
|
106
|
-
@include opacity
|
|
107
|
+
@include opacity($i);
|
|
107
108
|
}
|
|
108
109
|
.focus\:opacity-#{$i}\@#{$breakpoint}:focus {
|
|
109
|
-
@include opacity
|
|
110
|
+
@include opacity($i);
|
|
110
111
|
}
|
|
111
112
|
.active\:opacity-#{$i}\@#{$breakpoint}:active {
|
|
112
|
-
@include opacity
|
|
113
|
+
@include opacity($i);
|
|
113
114
|
}
|
|
114
115
|
.group:hover .group-hover\:opacity-#{$i}\@#{$breakpoint} {
|
|
115
|
-
@include opacity
|
|
116
|
+
@include opacity($i);
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
|
-
|
|
121
|
-
// Transition Opacity
|
|
122
|
-
// TODO move to transitons may be?
|
|
123
|
-
.transition-opacity {
|
|
124
|
-
transition-property: opacity;
|
|
125
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
126
|
-
transition-duration: 150ms;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
121
|
+
}
|
|
@@ -173,7 +173,6 @@
|
|
|
173
173
|
|
|
174
174
|
// todo: Documentation
|
|
175
175
|
@mixin absolute-center {
|
|
176
|
-
& {
|
|
177
176
|
position: absolute;
|
|
178
177
|
left: 50%;
|
|
179
178
|
top: 50%;
|
|
@@ -182,7 +181,6 @@
|
|
|
182
181
|
--translate-y: -50%;
|
|
183
182
|
|
|
184
183
|
transform: translateX(var(--translate-x)) translateY(var(--translate-y)) translateZ(var(--translate-z, 0)) rotate(var(--rotate, 0)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1));
|
|
185
|
-
}
|
|
186
184
|
}
|
|
187
185
|
|
|
188
186
|
// todo: Documentation
|
|
@@ -255,4 +253,4 @@ $position-fractions: (
|
|
|
255
253
|
}
|
|
256
254
|
}
|
|
257
255
|
}
|
|
258
|
-
}
|
|
256
|
+
}
|
|
@@ -1,98 +1,117 @@
|
|
|
1
1
|
// _spacing.scss
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
@use 'sass:math';
|
|
4
4
|
@use 'sass:string' as str;
|
|
5
5
|
@use '../abstracts' as VAR;
|
|
6
6
|
@use './container-queries' as Q;
|
|
7
7
|
@use './media-queries' as MQ;
|
|
8
8
|
|
|
9
|
-
@mixin width($value) {
|
|
10
|
-
@mixin height($value) {
|
|
9
|
+
@mixin width($value) { width: $value; }
|
|
10
|
+
@mixin height($value) { height: $value; }
|
|
11
11
|
@mixin min-width($value) { min-width: $value; }
|
|
12
12
|
@mixin min-height($value) { min-height: $value; }
|
|
13
13
|
@mixin max-width($value) { max-width: $value; }
|
|
14
14
|
@mixin max-height($value) { max-height: $value; }
|
|
15
15
|
|
|
16
|
-
@mixin width-percent($i) {
|
|
17
|
-
@mixin height-percent($i) {
|
|
18
|
-
@mixin min-width-percent($i) {
|
|
19
|
-
@mixin min-height-percent($i) {
|
|
20
|
-
@mixin max-width-percent($i) {
|
|
21
|
-
@mixin max-height-percent($i) {
|
|
16
|
+
@mixin width-percent($i) { width: str.unquote($i + '%'); }
|
|
17
|
+
@mixin height-percent($i) { height: str.unquote($i + '%'); }
|
|
18
|
+
@mixin min-width-percent($i) { min-width: str.unquote($i + '%'); }
|
|
19
|
+
@mixin min-height-percent($i) { min-height: str.unquote($i + '%'); }
|
|
20
|
+
@mixin max-width-percent($i) { max-width: str.unquote($i + '%'); }
|
|
21
|
+
@mixin max-height-percent($i) { max-height: str.unquote($i + '%'); }
|
|
22
22
|
|
|
23
|
-
@mixin w-auto {
|
|
24
|
-
@mixin w-full {
|
|
25
|
-
@mixin h-auto {
|
|
26
|
-
@mixin h-full {
|
|
27
|
-
@mixin
|
|
28
|
-
@mixin max
|
|
29
|
-
@mixin min
|
|
30
|
-
@mixin
|
|
23
|
+
@mixin w-auto { @include width(auto);}
|
|
24
|
+
@mixin w-full { @include width(100%);}
|
|
25
|
+
@mixin h-auto { @include height(auto);}
|
|
26
|
+
@mixin h-full { @include height(100%);}
|
|
27
|
+
@mixin w-max { @include width(max-content);}
|
|
28
|
+
@mixin h-max { @include height(max-content);}
|
|
29
|
+
@mixin w-min { @include width(min-content);}
|
|
30
|
+
@mixin h-min { @include height(min-content);}
|
|
31
|
+
@mixin w-fit { @include width(fit-content);}
|
|
32
|
+
@mixin h-fit { @include height(fit-content);}
|
|
33
|
+
@mixin min-w-full { @include min-width(100%);}
|
|
34
|
+
@mixin max-w-full { @include max-width(100%);}
|
|
35
|
+
@mixin min-h-full { @include min-height(100%);}
|
|
36
|
+
@mixin max-h-full { @include max-height(100%);}
|
|
31
37
|
|
|
32
|
-
@mixin w-screen {
|
|
33
|
-
@mixin h-screen {
|
|
38
|
+
@mixin w-screen { width: 100vw; }
|
|
39
|
+
@mixin h-screen { height: 100dvh; }
|
|
34
40
|
|
|
35
41
|
@if VAR.$generate-utility-classes {
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
.w-screen { @include w-screen; }
|
|
43
|
+
.h-screen { @include h-screen; }
|
|
38
44
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
.w-auto { @include w-auto; }
|
|
46
|
+
.w-full { @include w-full; }
|
|
47
|
+
.h-auto { @include h-auto; }
|
|
48
|
+
.h-full { @include h-full; }
|
|
49
|
+
.w-min { @include w-min;}
|
|
50
|
+
.h-min { @include h-min;}
|
|
51
|
+
.w-fit { @include w-fit;}
|
|
52
|
+
.h-fit { @include h-fit;}
|
|
53
|
+
|
|
54
|
+
.min-w-full { @include min-w-full; }
|
|
55
|
+
.max-w-full { @include max-w-full; }
|
|
56
|
+
.min-h-full { @include min-h-full; }
|
|
57
|
+
.max-h-full { @include max-h-full; }
|
|
42
58
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
.
|
|
46
|
-
.
|
|
47
|
-
.min-
|
|
48
|
-
.
|
|
59
|
+
// Percentage widths
|
|
60
|
+
@each $i in VAR.$percentages {
|
|
61
|
+
.w-#{$i}p { @include width-percent($i); }
|
|
62
|
+
.h-#{$i}p { @include height-percent($i); }
|
|
63
|
+
.min-w-#{$i}p { @include min-width-percent($i); }
|
|
64
|
+
.min-h-#{$i}p { @include min-height-percent($i); }
|
|
65
|
+
.max-w-#{$i}p { @include max-width-percent($i); }
|
|
66
|
+
.max-h-#{$i}p { @include max-height-percent($i); }
|
|
67
|
+
}
|
|
49
68
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
69
|
+
// Generate utilities from spacing map
|
|
70
|
+
@each $key, $value in VAR.$spacings {
|
|
71
|
+
.w-#{$key} { @include width($value); }
|
|
72
|
+
.h-#{$key} { @include height($value); }
|
|
73
|
+
.min-w-#{$key} { @include min-width($value); }
|
|
74
|
+
.min-h-#{$key} { @include min-height($value); }
|
|
75
|
+
.max-w-#{$key} { @include max-width($value); }
|
|
76
|
+
.max-h-#{$key} { @include max-height($value); }
|
|
77
|
+
}
|
|
59
78
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
.w-#{$key} { @include width($value); }
|
|
63
|
-
.h-#{$key} { @include height($value); }
|
|
64
|
-
.min-w-#{$key} { @include min-width($value); }
|
|
65
|
-
.min-h-#{$key} { @include min-height($value); }
|
|
66
|
-
.max-w-#{$key} { @include max-width($value); }
|
|
67
|
-
.max-h-#{$key} { @include max-height($value); }
|
|
68
|
-
}
|
|
79
|
+
// Pixel widths based on spacing scale
|
|
80
|
+
@each $breakpoint, $width in VAR.$breakpoints {
|
|
69
81
|
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
.w-#{$breakpoint} { @include width($width); }
|
|
83
|
+
.min-w-#{$breakpoint} { @include min-width($width); }
|
|
84
|
+
.max-w-#{$breakpoint} { @include max-width($width); }
|
|
72
85
|
|
|
73
|
-
.w-#{$breakpoint} { @include width($width); }
|
|
74
|
-
.min-w-#{$breakpoint} { @include min-width($width); }
|
|
75
|
-
.max-w-#{$breakpoint} { @include max-width($width); }
|
|
76
86
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
.w-auto\@#{$breakpoint} { @include w-auto; }
|
|
88
|
+
.w-full\@#{$breakpoint} { @include w-full; }
|
|
89
|
+
.h-auto\@#{$breakpoint} { @include h-auto; }
|
|
90
|
+
.h-full\@#{$breakpoint} { @include h-full; }
|
|
91
|
+
.w-min\@#{$breakpoint}{ @include w-min;}
|
|
92
|
+
.h-min\@#{$breakpoint}{ @include h-min;}
|
|
93
|
+
.w-fit\@#{$breakpoint}{ @include w-fit;}
|
|
94
|
+
.h-fit\@#{$breakpoint}{ @include h-fit;}
|
|
95
|
+
|
|
96
|
+
@include MQ.media-up ($breakpoint) {
|
|
97
|
+
// Generate utilities from spacing map
|
|
98
|
+
@each $i in VAR.$percentages {
|
|
99
|
+
.w-#{$i}p\@#{$breakpoint} { @include width-percent($i); }
|
|
100
|
+
.h-#{$i}p\@#{$breakpoint} { @include height-percent($i); }
|
|
101
|
+
.min-w-#{$i}p\@#{$breakpoint} { @include min-width-percent($i); }
|
|
102
|
+
.min-h-#{$i}p\@#{$breakpoint} { @include min-height-percent($i); }
|
|
103
|
+
.max-w-#{$i}p\@#{$breakpoint} { @include max-width-percent($i); }
|
|
104
|
+
.max-h-#{$i}p\@#{$breakpoint} { @include max-height-percent($i); }
|
|
105
|
+
}
|
|
87
106
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
107
|
+
@each $key, $value in VAR.$spacings {
|
|
108
|
+
.w-#{$key}\@#{$breakpoint} { @include width($value); }
|
|
109
|
+
.h-#{$key}\@#{$breakpoint} { @include height($value); }
|
|
110
|
+
.min-w-#{$key}\@#{$breakpoint} { @include min-width($value); }
|
|
111
|
+
.min-h-#{$key}\@#{$breakpoint} { @include min-height($value); }
|
|
112
|
+
.max-w-#{$key}\@#{$breakpoint} { @include max-width($value); }
|
|
113
|
+
.max-h-#{$key}\@#{$breakpoint} { @include max-height($value); }
|
|
114
|
+
}
|
|
97
115
|
}
|
|
98
|
-
}
|
|
116
|
+
}
|
|
117
|
+
}
|