yummacss 2.1.0 → 3.0.1
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/LICENSE +17 -18
- package/README.md +58 -23
- package/dist/cli/commands/build.js +43 -0
- package/dist/cli/commands/init.js +19 -0
- package/dist/cli/commands/watch.js +48 -0
- package/dist/cli/config/defaultConfig.js +9 -0
- package/dist/cli/config/templates.js +33 -0
- package/dist/cli/lang.js +23 -0
- package/dist/cli/lib/cli-lang.js +23 -0
- package/dist/cli/lib/cli-ui.js +14 -0
- package/dist/cli/services/configLoader.js +42 -0
- package/dist/cli/services/minifyService.js +16 -0
- package/dist/cli/services/purgeService.js +12 -0
- package/dist/cli/services/scssCompiler.js +34 -0
- package/dist/cli/src/cli.js +16 -0
- package/dist/cli/utils/cli-ui.js +13 -0
- package/dist/cli/utils/ui.js +15 -0
- package/package.json +65 -24
- package/src/_fonts.scss +8 -6
- package/src/abstracts/_breakpoints.scss +12 -10
- package/src/abstracts/_index.scss +5 -0
- package/src/abstracts/_theme.scss +19 -16
- package/src/abstracts/_variables.scss +70 -56
- package/src/abstracts/functions/_create-values.scss +16 -0
- package/src/abstracts/functions/_ignore-neutral.scss +9 -0
- package/src/abstracts/functions/_index.scss +2 -0
- package/src/abstracts/mixins/_create-colors.scss +39 -0
- package/src/abstracts/mixins/_create-utilities.scss +39 -0
- package/src/abstracts/mixins/_extend-utilities.scss +24 -0
- package/src/abstracts/mixins/_index.scss +3 -0
- package/src/reset/_stylecent.scss +231 -0
- package/src/utilities/_background.scss +95 -0
- package/src/utilities/_border.scss +313 -0
- package/src/utilities/_box-model.scss +274 -91
- package/src/utilities/_color.scss +85 -0
- package/src/utilities/_effect.scss +98 -0
- package/src/utilities/_flexbox.scss +122 -56
- package/src/utilities/_grid.scss +52 -95
- package/src/utilities/_index.scss +14 -0
- package/src/utilities/_interactivity.scss +304 -0
- package/src/utilities/_outline.scss +53 -0
- package/src/utilities/_positioning.scss +436 -0
- package/src/utilities/_svg.scss +27 -0
- package/src/utilities/_table.scss +35 -0
- package/src/utilities/_transform.scss +164 -0
- package/src/utilities/_typography.scss +167 -57
- package/src/utilities/maps/_index.scss +12 -0
- package/src/utilities/maps/box-model/_dimension.scss +16 -0
- package/src/utilities/maps/box-model/_height.scss +16 -0
- package/src/utilities/maps/box-model/_margin.scss +10 -0
- package/src/utilities/maps/box-model/_padding.scss +10 -0
- package/src/utilities/maps/box-model/_width.scss +16 -0
- package/src/utilities/maps/flexbox/_flex-basis.scss +12 -0
- package/src/utilities/maps/grid/_gap.scss +5 -0
- package/src/yummacss-core.scss +3 -0
- package/src/yummacss.scss +4 -0
- package/.prettierrc +0 -9
- package/CHANGELOG.md +0 -58
- package/dist/yumma-core.css +0 -238809
- package/dist/yumma-core.min.css +0 -1
- package/dist/yumma.css +0 -238878
- package/dist/yumma.min.css +0 -1
- package/gulpfile.js +0 -44
- package/src/_base.scss +0 -72
- package/src/abstracts/_colors.scss +0 -29
- package/src/abstracts/_extensions.scss +0 -19
- package/src/abstracts/_functions.scss +0 -3
- package/src/abstracts/_layout.scss +0 -18
- package/src/abstracts/_mixins.scss +0 -575
- package/src/core.scss +0 -3
- package/src/utilities/_borders.scss +0 -214
- package/src/utilities/_effects.scss +0 -74
- package/src/utilities/_filters.scss +0 -57
- package/src/utilities/_interactions.scss +0 -111
- package/src/utilities/_layout.scss +0 -310
- package/src/utilities/_outlines.scss +0 -76
- package/src/utilities/_tables.scss +0 -61
- package/src/yumma.scss +0 -23
|
@@ -1,37 +1,39 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
1
3
|
$yma-breakpoints: (
|
|
2
|
-
"sm":
|
|
3
|
-
"md":
|
|
4
|
-
"lg":
|
|
5
|
-
"xl":
|
|
6
|
-
"xxl":
|
|
4
|
+
"sm": 40rem,
|
|
5
|
+
"md": 48rem,
|
|
6
|
+
"lg": 64rem,
|
|
7
|
+
"xl": 80rem,
|
|
8
|
+
"xxl": 96rem,
|
|
7
9
|
);
|
|
8
10
|
|
|
9
11
|
@mixin sm {
|
|
10
|
-
@media (min-width: map
|
|
12
|
+
@media (min-width: map.get($yma-breakpoints, "sm")) {
|
|
11
13
|
@content;
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
@mixin md {
|
|
16
|
-
@media (min-width: map
|
|
18
|
+
@media (min-width: map.get($yma-breakpoints, "md")) {
|
|
17
19
|
@content;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
@mixin lg {
|
|
22
|
-
@media (min-width: map
|
|
24
|
+
@media (min-width: map.get($yma-breakpoints, "lg")) {
|
|
23
25
|
@content;
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
@mixin xl {
|
|
28
|
-
@media (min-width: map
|
|
30
|
+
@media (min-width: map.get($yma-breakpoints, "xl")) {
|
|
29
31
|
@content;
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
@mixin xxl {
|
|
34
|
-
@media (min-width: map
|
|
36
|
+
@media (min-width: map.get($yma-breakpoints, "xxl")) {
|
|
35
37
|
@content;
|
|
36
38
|
}
|
|
37
39
|
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "variables" as vars;
|
|
3
|
+
|
|
1
4
|
$yma-theme: (
|
|
2
|
-
"red":
|
|
3
|
-
"orange":
|
|
4
|
-
"yellow":
|
|
5
|
-
"green":
|
|
6
|
-
"teal":
|
|
7
|
-
"cyan":
|
|
8
|
-
"blue":
|
|
9
|
-
"indigo":
|
|
10
|
-
"violet":
|
|
11
|
-
"pink":
|
|
12
|
-
"silver":
|
|
13
|
-
"gray":
|
|
14
|
-
"lead":
|
|
15
|
-
"black":
|
|
16
|
-
"white":
|
|
17
|
-
"transparent":
|
|
5
|
+
"red": vars.$yma-color-red,
|
|
6
|
+
"orange": vars.$yma-color-orange,
|
|
7
|
+
"yellow": vars.$yma-color-yellow,
|
|
8
|
+
"green": vars.$yma-color-green,
|
|
9
|
+
"teal": vars.$yma-color-teal,
|
|
10
|
+
"cyan": vars.$yma-color-cyan,
|
|
11
|
+
"blue": vars.$yma-color-blue,
|
|
12
|
+
"indigo": vars.$yma-color-indigo,
|
|
13
|
+
"violet": vars.$yma-color-violet,
|
|
14
|
+
"pink": vars.$yma-color-pink,
|
|
15
|
+
"silver": vars.$yma-color-silver,
|
|
16
|
+
"gray": vars.$yma-color-gray,
|
|
17
|
+
"lead": vars.$yma-color-lead,
|
|
18
|
+
"black": vars.$yma-color-black,
|
|
19
|
+
"white": vars.$yma-color-white,
|
|
20
|
+
"transparent": vars.$yma-color-transparent,
|
|
18
21
|
);
|
|
@@ -1,68 +1,82 @@
|
|
|
1
|
-
//
|
|
2
|
-
$yma-color-red:
|
|
3
|
-
$yma-color-orange:
|
|
4
|
-
$yma-color-yellow:
|
|
5
|
-
$yma-color-green:
|
|
6
|
-
$yma-color-teal:
|
|
7
|
-
$yma-color-cyan:
|
|
8
|
-
$yma-color-blue:
|
|
9
|
-
$yma-color-indigo:
|
|
10
|
-
$yma-color-violet:
|
|
11
|
-
$yma-color-pink:
|
|
12
|
-
$yma-color-
|
|
13
|
-
$yma-color-gray:
|
|
14
|
-
$yma-color-
|
|
15
|
-
$yma-color-black: black;
|
|
16
|
-
$yma-color-white: white;
|
|
17
|
-
$yma-color-transparent: transparent;
|
|
1
|
+
// color
|
|
2
|
+
$yma-color-red: rgb(215, 61, 61) !default;
|
|
3
|
+
$yma-color-orange: rgb(224, 104, 20) !default;
|
|
4
|
+
$yma-color-yellow: rgb(211, 161, 7) !default;
|
|
5
|
+
$yma-color-green: rgb(31, 177, 85) !default;
|
|
6
|
+
$yma-color-teal: rgb(18, 166, 149) !default;
|
|
7
|
+
$yma-color-cyan: rgb(5, 164, 191) !default;
|
|
8
|
+
$yma-color-blue: rgb(53, 117, 221) !default;
|
|
9
|
+
$yma-color-indigo: rgb(89, 92, 217) !default;
|
|
10
|
+
$yma-color-violet: rgb(125, 83, 221) !default;
|
|
11
|
+
$yma-color-pink: rgb(212, 65, 138) !default;
|
|
12
|
+
$yma-color-lead: rgb(63, 63, 78) !default;
|
|
13
|
+
$yma-color-gray: rgb(96, 103, 115) !default;
|
|
14
|
+
$yma-color-silver: rgb(191, 194, 199) !default;
|
|
15
|
+
$yma-color-black: black !default;
|
|
16
|
+
$yma-color-white: white !default;
|
|
17
|
+
$yma-color-transparent: transparent !default;
|
|
18
18
|
|
|
19
|
-
//
|
|
20
|
-
$yma-border: 1px;
|
|
21
|
-
$yma-border-radius: 0.25rem;
|
|
22
|
-
|
|
23
|
-
// outlines
|
|
24
|
-
$yma-outline-offset: 1px;
|
|
25
|
-
$yma-outline-width: 1px;
|
|
26
|
-
$yma-decoration-thickness: 1px;
|
|
19
|
+
// border
|
|
20
|
+
$yma-border: 1px !default;
|
|
21
|
+
$yma-border-radius: 0.25rem !default;
|
|
22
|
+
$yma-border-spacing: 0.25rem !default;
|
|
27
23
|
|
|
28
24
|
// box model
|
|
29
|
-
$yma-
|
|
30
|
-
$yma-
|
|
31
|
-
$yma-
|
|
32
|
-
$yma-
|
|
33
|
-
$yma-
|
|
25
|
+
$yma-dimension: 0.25rem !default;
|
|
26
|
+
$yma-height: 0.25rem !default;
|
|
27
|
+
$yma-width: 0.25rem !default;
|
|
28
|
+
$yma-padding: 0.25rem !default;
|
|
29
|
+
$yma-margin: 0.25rem !default;
|
|
30
|
+
$yma-spacing: 0.25rem !default;
|
|
31
|
+
|
|
32
|
+
// effect
|
|
33
|
+
$yma-backdrop-blur: 4px !default;
|
|
34
|
+
|
|
35
|
+
$yma-blur: 4px !default;
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
$yma-
|
|
37
|
+
$yma-box-shadow-lg: 1px 3px 5px 1px rgb(0, 0, 0, 0.1) !default;
|
|
38
|
+
$yma-box-shadow-md: 1px 3px 5px -1px rgb(0, 0, 0, 0.1) !default;
|
|
39
|
+
$yma-box-shadow-sm: 1px 3px 5px -2px rgb(0, 0, 0, 0.1) !default;
|
|
40
|
+
$yma-box-shadow-xl: 1px 3px 5px 2px rgb(0, 0, 0, 0.1) !default;
|
|
41
|
+
$yma-box-shadow-xs: 1px 3px 5px -3px rgb(0, 0, 0, 0.1) !default;
|
|
37
42
|
|
|
38
|
-
|
|
39
|
-
$yma-box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.1);
|
|
43
|
+
$yma-grayscale: 10% !default;
|
|
40
44
|
|
|
41
45
|
// flexbox
|
|
42
|
-
$yma-flex-basis: 0.25rem;
|
|
46
|
+
$yma-flex-basis: 0.25rem !default;
|
|
43
47
|
|
|
44
48
|
// grid
|
|
45
|
-
$yma-gap: 0.25rem;
|
|
46
|
-
$yma-column-gap: 0.25rem;
|
|
47
|
-
$yma-row-gap: 0.25rem;
|
|
49
|
+
$yma-gap: 0.25rem !default;
|
|
50
|
+
$yma-column-gap: 0.25rem !default;
|
|
51
|
+
$yma-row-gap: 0.25rem !default;
|
|
52
|
+
|
|
53
|
+
// outline
|
|
54
|
+
$yma-outline-offset: 1px !default;
|
|
55
|
+
$yma-outline-width: 1px !default;
|
|
56
|
+
|
|
57
|
+
// positioning
|
|
58
|
+
$yma-bottom-left-top-right: 0.25rem !default;
|
|
59
|
+
|
|
60
|
+
// text
|
|
61
|
+
$yma-decoration-thickness: 1px !default;
|
|
48
62
|
|
|
49
|
-
//
|
|
50
|
-
$yma-
|
|
63
|
+
// font
|
|
64
|
+
$yma-font-size-xs: 0.75rem !default;
|
|
65
|
+
$yma-font-size-sm: 0.875rem !default;
|
|
66
|
+
$yma-font-size-md: 1rem !default;
|
|
67
|
+
$yma-font-size-lg: 1.125rem !default;
|
|
68
|
+
$yma-font-size-xl: 1.25rem !default;
|
|
69
|
+
$yma-font-size-2xl: 1.5rem !default;
|
|
70
|
+
$yma-font-size-3xl: 1.875rem !default;
|
|
71
|
+
$yma-font-size-4xl: 2.25rem !default;
|
|
72
|
+
$yma-font-size-5xl: 3rem !default;
|
|
73
|
+
$yma-font-size-6xl: 3.75rem !default;
|
|
74
|
+
$yma-font-size-7xl: 4.5rem !default;
|
|
75
|
+
$yma-font-size-8xl: 6rem !default;
|
|
76
|
+
$yma-font-size-9xl: 8rem !default;
|
|
51
77
|
|
|
52
|
-
|
|
53
|
-
$yma-font-size: 0.75rem;
|
|
54
|
-
$yma-font-weight: 500;
|
|
55
|
-
$yma-font-size-xs: $yma-font-size;
|
|
56
|
-
$yma-font-size-b: 1rem;
|
|
57
|
-
$yma-font-size-sm: $yma-font-size * 2;
|
|
58
|
-
$yma-font-size-md: $yma-font-size * 3;
|
|
59
|
-
$yma-font-size-lg: $yma-font-size * 4;
|
|
60
|
-
$yma-font-size-xl: $yma-font-size * 5;
|
|
61
|
-
$yma-font-size-xxl: $yma-font-size * 6;
|
|
62
|
-
$yma-font-size-3xl: $yma-font-size * 7;
|
|
63
|
-
$yma-font-size-6xl: $yma-font-size * 8;
|
|
64
|
-
$yma-font-size-9xl: $yma-font-size * 9;
|
|
78
|
+
$yma-font-weight: 500 !default;
|
|
65
79
|
|
|
66
|
-
$yma-font-charter: Charter, Cambria, serif;
|
|
67
|
-
$yma-font-mono:
|
|
68
|
-
$yma-font-system: system-ui, sans-serif;
|
|
80
|
+
$yma-font-charter: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif !default;
|
|
81
|
+
$yma-font-mono: "Nimbus Mono PS", "Courier New", monospace !default;
|
|
82
|
+
$yma-font-system: system-ui, sans-serif !default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
|
|
3
|
+
@mixin mod-color-scaling($property, $prefix, $k, $v) {
|
|
4
|
+
.#{$prefix}-#{$k} {
|
|
5
|
+
#{$property}: $v;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.h\:#{$prefix}-#{$k} {
|
|
9
|
+
&:hover {
|
|
10
|
+
#{$property}: $v;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@mixin shade-scaling($property, $prefix, $k, $v, $percentage) {
|
|
16
|
+
@for $i from 1 through 13 {
|
|
17
|
+
@if $i <= 6 {
|
|
18
|
+
.#{$prefix}-#{$k}-#{$i} {
|
|
19
|
+
#{$property}: color.mix(white, $v, (7 - $i) * $percentage);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.h\:#{$prefix}-#{$k}-#{$i} {
|
|
23
|
+
&:hover {
|
|
24
|
+
#{$property}: color.mix(white, $v, (7 - $i) * $percentage);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
} @else if $i > 7 {
|
|
28
|
+
.#{$prefix}-#{$k}-#{$i - 1} {
|
|
29
|
+
#{$property}: color.mix(black, $v, ($i - 7) * $percentage);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.h\:#{$prefix}-#{$k}-#{$i - 1} {
|
|
33
|
+
&:hover {
|
|
34
|
+
#{$property}: color.mix(black, $v, ($i - 7) * $percentage);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@use "../breakpoints" as bp;
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
@mixin create-utilities($map, $prefix, $properties) {
|
|
5
|
+
$function: if(
|
|
6
|
+
map.has-key($map, "property-function"),
|
|
7
|
+
map.get($map, "property-function"),
|
|
8
|
+
null
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
// base styles
|
|
12
|
+
@each $k, $v in map.get($map, "values") {
|
|
13
|
+
.#{$prefix}-#{$k} {
|
|
14
|
+
@each $property in $properties {
|
|
15
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// hover styles
|
|
20
|
+
.h\:#{$prefix}-#{$k}:hover {
|
|
21
|
+
@each $property in $properties {
|
|
22
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// responsive styles
|
|
28
|
+
@each $bp, $bp-value in bp.$yma-breakpoints {
|
|
29
|
+
@media (min-width: $bp-value) {
|
|
30
|
+
@each $k, $v in map.get($map, "values") {
|
|
31
|
+
.#{$bp}\:#{$prefix}-#{$k} {
|
|
32
|
+
@each $property in $properties {
|
|
33
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@mixin extensions($map, $prefixes) {
|
|
2
|
+
@each $k, $v in $map {
|
|
3
|
+
@each $prefix, $property in $prefixes {
|
|
4
|
+
// base styles
|
|
5
|
+
.#{$prefix}-#{$k} {
|
|
6
|
+
#{$property}: $v;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// hover styles
|
|
10
|
+
.h\:#{$prefix}-#{$k}:hover {
|
|
11
|
+
#{$property}: $v;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@each $bp, $bp-value in $yma-breakpoints {
|
|
15
|
+
// responsive styles
|
|
16
|
+
.#{$bp}\:#{$prefix}-#{$k} {
|
|
17
|
+
@include breakpoint($bp-value) {
|
|
18
|
+
#{$property}: $v;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
@use "../abstracts/variables" as vars;
|
|
2
|
+
|
|
3
|
+
/** -- Box sizing --
|
|
4
|
+
* 1. Use a more intuitive box-sizing model to make the design consistent.
|
|
5
|
+
* 2. Remove default margin and padding.
|
|
6
|
+
* 3. Reset default border styles.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
*,
|
|
10
|
+
*::before,
|
|
11
|
+
*::after {
|
|
12
|
+
box-sizing: border-box; /* 1 */
|
|
13
|
+
border: 0 solid; /* 3 */
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
* {
|
|
17
|
+
margin: 0; /* 2 */
|
|
18
|
+
padding: 0; /* 2 */
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** -- Document --
|
|
22
|
+
* 1. Improve font smoothing.
|
|
23
|
+
* 2. Set a default system font.
|
|
24
|
+
* 3. Add accessible line-height.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
body {
|
|
28
|
+
-webkit-font-smoothing: antialiased; /* 1 */
|
|
29
|
+
font-family: vars.$yma-font-system; /* 2 */
|
|
30
|
+
line-height: 1.5; /* 3 */
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** -- Media Elements --
|
|
34
|
+
* 1. Ensure all media elements like images, videos, and canvases are block-level.
|
|
35
|
+
* 2. Limit their maximum width to the parent container.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
canvas,
|
|
39
|
+
img,
|
|
40
|
+
picture,
|
|
41
|
+
svg,
|
|
42
|
+
video {
|
|
43
|
+
display: block; /* 1 */
|
|
44
|
+
max-width: 100%; /* 2 */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** -- Form Elements --
|
|
48
|
+
* 1. Reset background and border styles for form elements.
|
|
49
|
+
* 2. Use `inherit` to ensure font consistency within forms.
|
|
50
|
+
* 3. Add default padding for usability.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
button,
|
|
54
|
+
input,
|
|
55
|
+
optgroup,
|
|
56
|
+
select,
|
|
57
|
+
textarea {
|
|
58
|
+
background-color: vars.$yma-color-transparent; /* 1 */
|
|
59
|
+
font-family: inherit; /* 2 */
|
|
60
|
+
padding: 0.5rem; /* 3 */
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Add a default border to form elements that do not have a class attribute.
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
button:not([class]),
|
|
68
|
+
input:not([class]),
|
|
69
|
+
optgroup:not([class]),
|
|
70
|
+
select:not([class]),
|
|
71
|
+
textarea:not([class]) {
|
|
72
|
+
border: 1px solid vars.$yma-color-silver; /* 1 */
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Apply consistent focus styles to interactive elements.
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
a,
|
|
80
|
+
button,
|
|
81
|
+
input,
|
|
82
|
+
select,
|
|
83
|
+
summary,
|
|
84
|
+
textarea {
|
|
85
|
+
&:focus {
|
|
86
|
+
outline: 2px solid vars.$yma-color-transparent;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Set a minimum height for textareas without a defined `rows` attribute.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
textarea:not([rows]) {
|
|
95
|
+
min-height: 10em;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Ensure the buttons have a pointer cursor.
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
button {
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Disabled States
|
|
107
|
+
* 1. Reduce opacity and set a "not-allowed" cursor for disabled elements.
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
button:disabled,
|
|
111
|
+
input:disabled,
|
|
112
|
+
select:disabled,
|
|
113
|
+
textarea:disabled {
|
|
114
|
+
cursor: not-allowed; /* 1 */
|
|
115
|
+
opacity: 0.5; /* 1 */
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** -- Typography --
|
|
119
|
+
* 1. Avoid text overflows.
|
|
120
|
+
* 2. Improve line wrapping for headings.
|
|
121
|
+
* 3. Add a consistent font weight for bold text.
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
h1,
|
|
125
|
+
h2,
|
|
126
|
+
h3,
|
|
127
|
+
h4,
|
|
128
|
+
h5,
|
|
129
|
+
h6,
|
|
130
|
+
p {
|
|
131
|
+
overflow-wrap: break-word; /* 1 */
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
h1,
|
|
135
|
+
h2,
|
|
136
|
+
h3,
|
|
137
|
+
h4,
|
|
138
|
+
h5,
|
|
139
|
+
h6 {
|
|
140
|
+
font-size: 1rem; /* 3 */
|
|
141
|
+
font-weight: 600; /* 3 */
|
|
142
|
+
text-wrap: balance; /* 2 */
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
p {
|
|
146
|
+
text-wrap: pretty; /* 2 */
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Add the correct font weight in Chrome, Edge, and Safari.
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
b,
|
|
154
|
+
strong {
|
|
155
|
+
font-weight: 700;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Add the correct font size in all browsers.
|
|
160
|
+
*/
|
|
161
|
+
|
|
162
|
+
small {
|
|
163
|
+
font-size: 80%;
|
|
164
|
+
line-height: 1.4;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* 1. Correct the inheritance and scaling of font size in all browsers.
|
|
169
|
+
* 2. Correct the odd `em` font sizing in all browsers.
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
pre,
|
|
173
|
+
code,
|
|
174
|
+
kbd,
|
|
175
|
+
samp {
|
|
176
|
+
font-family: monospace, monospace; /* 1 */
|
|
177
|
+
font-size: 1em; /* 2 */
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** -- Links --
|
|
181
|
+
* 1. Remove underline styling from links by default.
|
|
182
|
+
* 3. Reset color to inherit from parent element.
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
a {
|
|
186
|
+
color: inherit; /* 3 */
|
|
187
|
+
text-decoration: none; /* 1 */
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** -- Lists --
|
|
191
|
+
* Remove default list styling and padding.
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
ol,
|
|
195
|
+
ul {
|
|
196
|
+
list-style: none;
|
|
197
|
+
padding: 0;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/** -- Tables --
|
|
201
|
+
* 1. Add a consistent font weight for bold text.
|
|
202
|
+
*/
|
|
203
|
+
|
|
204
|
+
th {
|
|
205
|
+
font-size: 1rem; /* 1 */
|
|
206
|
+
font-weight: 600; /* 1 */
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** -- Miscellaneous --
|
|
210
|
+
* 1. Add the correct height in Firefox.
|
|
211
|
+
* 2. Correct text decoration.
|
|
212
|
+
* 3. Add spacing around horizontal rules.
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
hr {
|
|
216
|
+
border-top: 1px solid vars.$yma-color-silver; /* 2 */
|
|
217
|
+
height: 0; /* 1 */
|
|
218
|
+
margin: 1em 0; /* 3 */
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Ensure details and summary elements display correctly.
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
details {
|
|
226
|
+
display: block;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
summary {
|
|
230
|
+
display: list-item;
|
|
231
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
@use "../abstracts/variables" as vars;
|
|
4
|
+
@use "../abstracts/mixins/" as mix;
|
|
5
|
+
|
|
6
|
+
$yma-background-utils: (
|
|
7
|
+
"background-attachment": (
|
|
8
|
+
"prefix": "ba",
|
|
9
|
+
"properties": (
|
|
10
|
+
"background-attachment",
|
|
11
|
+
),
|
|
12
|
+
"values": (
|
|
13
|
+
"f": fixed,
|
|
14
|
+
"l": local,
|
|
15
|
+
"s": scroll,
|
|
16
|
+
),
|
|
17
|
+
),
|
|
18
|
+
|
|
19
|
+
"background-clip": (
|
|
20
|
+
"prefix": "bc",
|
|
21
|
+
"properties": (
|
|
22
|
+
"background-clip",
|
|
23
|
+
),
|
|
24
|
+
"values": (
|
|
25
|
+
"bb": border-box,
|
|
26
|
+
"cb": content-box,
|
|
27
|
+
"pb": padding-box,
|
|
28
|
+
"t": text,
|
|
29
|
+
),
|
|
30
|
+
),
|
|
31
|
+
|
|
32
|
+
"background-origin": (
|
|
33
|
+
"prefix": "bo",
|
|
34
|
+
"properties": (
|
|
35
|
+
"background-origin",
|
|
36
|
+
),
|
|
37
|
+
"values": (
|
|
38
|
+
"bb": border-box,
|
|
39
|
+
"cb": content-box,
|
|
40
|
+
"pb": padding-box,
|
|
41
|
+
),
|
|
42
|
+
),
|
|
43
|
+
|
|
44
|
+
"background-position": (
|
|
45
|
+
"prefix": "bp",
|
|
46
|
+
"properties": (
|
|
47
|
+
"background-position",
|
|
48
|
+
),
|
|
49
|
+
"values": (
|
|
50
|
+
"b": bottom,
|
|
51
|
+
"c": center,
|
|
52
|
+
"l": left,
|
|
53
|
+
"lb": left bottom,
|
|
54
|
+
"lt": left top,
|
|
55
|
+
"r": right,
|
|
56
|
+
"rb": right bottom,
|
|
57
|
+
"rt": right top,
|
|
58
|
+
"t": top,
|
|
59
|
+
),
|
|
60
|
+
),
|
|
61
|
+
|
|
62
|
+
"background-repeat": (
|
|
63
|
+
"prefix": "br",
|
|
64
|
+
"properties": (
|
|
65
|
+
"background-repeat",
|
|
66
|
+
),
|
|
67
|
+
"values": (
|
|
68
|
+
"nr": no-repeat,
|
|
69
|
+
"r": repeat,
|
|
70
|
+
"ro": round,
|
|
71
|
+
"rx": repeat-x,
|
|
72
|
+
"ry": repeat-y,
|
|
73
|
+
"s": space,
|
|
74
|
+
),
|
|
75
|
+
),
|
|
76
|
+
|
|
77
|
+
"background-size": (
|
|
78
|
+
"prefix": "bs",
|
|
79
|
+
"properties": (
|
|
80
|
+
"background-size",
|
|
81
|
+
),
|
|
82
|
+
"values": (
|
|
83
|
+
"auto": auto,
|
|
84
|
+
"c": cover,
|
|
85
|
+
"co": contain,
|
|
86
|
+
),
|
|
87
|
+
),
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
@each $properties, $map in $yma-background-utils {
|
|
91
|
+
$prefix: map.get($map, "prefix");
|
|
92
|
+
$properties: map.get($map, "properties");
|
|
93
|
+
|
|
94
|
+
@include mix.create-utilities($map, $prefix, $properties);
|
|
95
|
+
}
|