@davidsouther/jiffies 1.0.0-beta.1 → 1.0.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/build/components/button_bar.js +24 -13
- package/build/components/select.d.ts +1 -4
- package/build/display.js +9 -1
- package/build/dom/dom.js +1 -0
- package/build/dom/form/form.d.ts +9 -8
- package/build/dom/form/form.js +14 -5
- package/build/dom/provide.d.ts +3 -0
- package/build/dom/provide.js +7 -0
- package/build/equal.d.ts +5 -4
- package/build/equal.js +19 -4
- package/build/fs.d.ts +48 -0
- package/build/fs.js +144 -0
- package/build/{components/index.d.ts → fs.test.d.ts} +0 -0
- package/build/fs.test.js +43 -0
- package/build/log.js +16 -4
- package/build/result.d.ts +11 -11
- package/build/result.js +2 -2
- package/build/scope/execute.js +1 -1
- package/build/scope/expect.d.ts +1 -1
- package/build/scope/expect.js +4 -3
- package/build/server/http/css.d.ts +5 -0
- package/build/server/http/css.js +47 -0
- package/build/server/http/index.js +4 -2
- package/build/server/http/response.js +6 -3
- package/build/test_all.d.ts +7 -1
- package/build/test_all.js +7 -8
- package/package.json +5 -2
- package/src/components/button_bar.ts +32 -26
- package/src/display.ts +8 -2
- package/src/dom/dom.ts +1 -0
- package/src/dom/form/form.ts +30 -7
- package/src/dom/provide.ts +11 -0
- package/src/equal.ts +22 -11
- package/src/fs.test.ts +53 -0
- package/src/fs.ts +180 -0
- package/src/index.html +4 -4
- package/src/log.ts +8 -4
- package/src/pico/_variables.scss +66 -0
- package/src/pico/components/_accordion.scss +112 -0
- package/src/pico/components/_button-group.scss +51 -0
- package/src/pico/components/_card.scss +47 -0
- package/src/pico/components/_dropdown.scss +203 -0
- package/src/pico/components/_modal.scss +181 -0
- package/src/pico/components/_nav.scss +79 -0
- package/src/pico/components/_progress.scss +70 -0
- package/src/pico/components/_property.scss +34 -0
- package/src/pico/content/_button.scss +152 -0
- package/src/pico/content/_code.scss +63 -0
- package/src/pico/content/_embedded.scss +0 -0
- package/src/pico/content/_form-alt.scss +276 -0
- package/src/pico/content/_form.scss +259 -0
- package/src/pico/content/_misc.scss +0 -0
- package/src/pico/content/_table.scss +28 -0
- package/src/pico/content/_toggle.scss +132 -0
- package/src/pico/content/_typography.scss +232 -0
- package/src/pico/layout/_container.scss +40 -0
- package/src/pico/layout/_document.scss +0 -0
- package/src/pico/layout/_flex.scss +46 -0
- package/src/pico/layout/_grid.scss +24 -0
- package/src/pico/layout/_scroller.scss +16 -0
- package/src/pico/layout/_section.scss +8 -0
- package/src/pico/layout/_sectioning.scss +53 -0
- package/src/pico/pico.scss +60 -0
- package/src/pico/reset/_accessibility.scss +34 -0
- package/src/pico/reset/_button.scss +17 -0
- package/src/pico/reset/_code.scss +15 -0
- package/src/pico/reset/_document.scss +48 -0
- package/src/pico/reset/_embedded.scss +39 -0
- package/src/pico/reset/_form.scss +97 -0
- package/src/pico/reset/_misc.scss +23 -0
- package/src/pico/reset/_nav.scss +5 -0
- package/src/pico/reset/_progress.scss +4 -0
- package/src/pico/reset/_table.scss +8 -0
- package/src/pico/reset/_typography.scss +25 -0
- package/src/pico/themes/default/_colors.scss +65 -0
- package/src/pico/themes/default/_dark.scss +148 -0
- package/src/pico/themes/default/_light.scss +149 -0
- package/src/pico/themes/default/_styles.scss +272 -0
- package/src/pico/themes/default.scss +34 -0
- package/src/pico/utilities/_accessibility.scss +3 -0
- package/src/pico/utilities/_loading.scss +52 -0
- package/src/pico/utilities/_reduce-motion.scss +27 -0
- package/src/pico/utilities/_tooltip.scss +101 -0
- package/src/result.ts +16 -20
- package/src/scope/execute.ts +1 -1
- package/src/scope/expect.ts +10 -9
- package/src/server/http/css.ts +63 -0
- package/src/server/http/index.ts +4 -2
- package/src/server/http/response.ts +7 -4
- package/src/test_all.ts +7 -8
- package/src/zip/spec.txt +3260 -0
- package/build/components/index.js +0 -1
- package/build/index.d.ts +0 -13
- package/build/index.js +0 -13
- package/build/parcel_resolver.d.ts +0 -3
- package/build/parcel_resolver.js +0 -19
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
progress {
|
|
2
|
+
// Reset the default appearance
|
|
3
|
+
-webkit-appearance: none;
|
|
4
|
+
-moz-appearance: none;
|
|
5
|
+
|
|
6
|
+
// Styles
|
|
7
|
+
display: inline-block;
|
|
8
|
+
appearance: none;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 0.5rem;
|
|
11
|
+
margin-bottom: calc(var(--spacing) * 0.5);
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
|
|
14
|
+
// Remove Firefox and Opera border
|
|
15
|
+
border: 0;
|
|
16
|
+
border-radius: var(--border-radius);
|
|
17
|
+
background-color: var(--progress-background-color);
|
|
18
|
+
|
|
19
|
+
// IE10 uses `color` to set the bar background-color
|
|
20
|
+
color: var(--progress-color);
|
|
21
|
+
|
|
22
|
+
&::-webkit-progress-bar {
|
|
23
|
+
border-radius: var(--border-radius);
|
|
24
|
+
background: none;
|
|
25
|
+
}
|
|
26
|
+
&[value]::-webkit-progress-value {
|
|
27
|
+
background-color: var(--progress-color);
|
|
28
|
+
}
|
|
29
|
+
&::-moz-progress-bar {
|
|
30
|
+
background-color: var(--progress-color);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Indeterminate state
|
|
34
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
35
|
+
&:indeterminate {
|
|
36
|
+
background: var(--progress-background-color)
|
|
37
|
+
linear-gradient(
|
|
38
|
+
to right,
|
|
39
|
+
var(--progress-color) 30%,
|
|
40
|
+
var(--progress-background-color) 30%
|
|
41
|
+
)
|
|
42
|
+
top left / 150% 150% no-repeat;
|
|
43
|
+
animation: progressIndeterminate 1s linear infinite;
|
|
44
|
+
|
|
45
|
+
&[value]::-webkit-progress-value {
|
|
46
|
+
background-color: transparent;
|
|
47
|
+
}
|
|
48
|
+
&::-moz-progress-bar {
|
|
49
|
+
background-color: transparent;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[dir="rtl"] {
|
|
56
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
57
|
+
progress:indeterminate {
|
|
58
|
+
animation-direction: reverse;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@keyframes progressIndeterminate {
|
|
64
|
+
0% {
|
|
65
|
+
background-position: 200% 0;
|
|
66
|
+
}
|
|
67
|
+
100% {
|
|
68
|
+
background-position: -200% 0;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
dl {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: minmax(max-content, 1fr) minmax(auto, 2fr);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
dt {
|
|
7
|
+
grid-column-start: 1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
dd {
|
|
11
|
+
grid-column-start: 2;
|
|
12
|
+
margin: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
dl > header {
|
|
16
|
+
grid-column: 1 / span 2;
|
|
17
|
+
font-weight: bold;
|
|
18
|
+
background-color: var(--muted-color);
|
|
19
|
+
color: var(--primary-inverse);
|
|
20
|
+
padding: var(--form-element-spacing-vertical)
|
|
21
|
+
var(--form-element-spacing-horizontal);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
dd,
|
|
25
|
+
dt {
|
|
26
|
+
padding: var(--form-element-spacing-vertical)
|
|
27
|
+
var(--form-element-spacing-horizontal);
|
|
28
|
+
border: 1px solid var(--muted-border-color);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
dd:nth-of-type(even),
|
|
32
|
+
dt:nth-of-type(even) {
|
|
33
|
+
background-color: var(--table-row-stripped-background-color);
|
|
34
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
button {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
margin-bottom: var(--spacing);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
[role="button"] {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
button,
|
|
13
|
+
input[type="submit"],
|
|
14
|
+
input[type="button"],
|
|
15
|
+
input[type="reset"],
|
|
16
|
+
[role="button"] {
|
|
17
|
+
--background-color: var(--primary);
|
|
18
|
+
--border-color: var(--primary);
|
|
19
|
+
--color: var(--primary-inverse);
|
|
20
|
+
--box-shadow: var(--button-box-shadow, 0 0 0 rgba(0, 0, 0, 0));
|
|
21
|
+
padding: var(--form-element-spacing-vertical)
|
|
22
|
+
var(--form-element-spacing-horizontal);
|
|
23
|
+
border: var(--border-width) solid var(--border-color);
|
|
24
|
+
border-radius: var(--border-radius);
|
|
25
|
+
outline: none;
|
|
26
|
+
background-color: var(--background-color);
|
|
27
|
+
box-shadow: var(--box-shadow);
|
|
28
|
+
color: var(--color);
|
|
29
|
+
font-weight: var(--font-weight);
|
|
30
|
+
font-size: 1rem;
|
|
31
|
+
line-height: var(--line-height);
|
|
32
|
+
text-align: center;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
|
|
35
|
+
@if $enable-transitions {
|
|
36
|
+
transition: background-color var(--transition),
|
|
37
|
+
border-color var(--transition), color var(--transition),
|
|
38
|
+
box-shadow var(--transition);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:is([aria-current], :hover, :active, :focus) {
|
|
42
|
+
--background-color: var(--primary-hover);
|
|
43
|
+
--border-color: var(--primary-hover);
|
|
44
|
+
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0));
|
|
45
|
+
--color: var(--primary-inverse);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:focus {
|
|
49
|
+
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
|
50
|
+
0 0 0 var(--outline-width) var(--primary-focus);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// .secondary, .contrast & .outline
|
|
55
|
+
@if $enable-classes {
|
|
56
|
+
// Secondary
|
|
57
|
+
:is(button, input[type="submit"], input[type="button"], [role="button"]).secondary,
|
|
58
|
+
input[type="reset"] {
|
|
59
|
+
--background-color: var(--secondary);
|
|
60
|
+
--border-color: var(--secondary);
|
|
61
|
+
--color: var(--secondary-inverse);
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
|
|
64
|
+
&:is([aria-current], :hover, :active, :focus) {
|
|
65
|
+
--background-color: var(--secondary-hover);
|
|
66
|
+
--border-color: var(--secondary-hover);
|
|
67
|
+
--color: var(--secondary-inverse);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:focus {
|
|
71
|
+
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
|
72
|
+
0 0 0 var(--outline-width) var(--secondary-focus);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Contrast
|
|
77
|
+
:is(button, input[type="submit"], input[type="button"], [role="button"]).contrast {
|
|
78
|
+
--background-color: var(--contrast);
|
|
79
|
+
--border-color: var(--contrast);
|
|
80
|
+
--color: var(--contrast-inverse);
|
|
81
|
+
|
|
82
|
+
&:is([aria-current], :hover, :active, :focus) {
|
|
83
|
+
--background-color: var(--contrast-hover);
|
|
84
|
+
--border-color: var(--contrast-hover);
|
|
85
|
+
--color: var(--contrast-inverse);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:focus {
|
|
89
|
+
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
|
90
|
+
0 0 0 var(--outline-width) var(--contrast-focus);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Outline (primary)
|
|
95
|
+
:is(button, input[type="submit"], input[type="button"], [role="button"]).outline,
|
|
96
|
+
input[type="reset"].outline {
|
|
97
|
+
--background-color: transparent;
|
|
98
|
+
--color: var(--primary);
|
|
99
|
+
|
|
100
|
+
&:is([aria-current], :hover, :active, :focus) {
|
|
101
|
+
--background-color: transparent;
|
|
102
|
+
--color: var(--primary-hover);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Outline (secondary)
|
|
107
|
+
:is(button, input[type="submit"], input[type="button"], [role="button"]).outline.secondary,
|
|
108
|
+
input[type="reset"].outline {
|
|
109
|
+
--color: var(--secondary);
|
|
110
|
+
|
|
111
|
+
&:is([aria-current], :hover, :active, :focus) {
|
|
112
|
+
--color: var(--secondary-hover);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Outline (contrast)
|
|
117
|
+
:is(button, input[type="submit"], input[type="button"], [role="button"]).outline.contrast {
|
|
118
|
+
--color: var(--contrast);
|
|
119
|
+
|
|
120
|
+
&:is([aria-current], :hover, :active, :focus) {
|
|
121
|
+
--color: var(--contrast-hover);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
} @else {
|
|
125
|
+
// Secondary button without .class
|
|
126
|
+
input[type="reset"] {
|
|
127
|
+
--background-color: var(--secondary);
|
|
128
|
+
--border-color: var(--secondary);
|
|
129
|
+
--color: var(--secondary-inverse);
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
|
|
132
|
+
&:is([aria-current], :hover, :active, :focus) {
|
|
133
|
+
--background-color: var(--secondary-hover);
|
|
134
|
+
--border-color: var(--secondary-hover);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&:focus {
|
|
138
|
+
--box-shadow: var(--button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
|
|
139
|
+
0 0 0 var(--outline-width) var(--secondary-focus);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Button [disabled]
|
|
145
|
+
// Links without href are disabled by default
|
|
146
|
+
:where(button, [type="submit"], [type="button"], [type="reset"], [role="button"])[disabled],
|
|
147
|
+
:where(fieldset[disabled])
|
|
148
|
+
:is(button, [type="submit"], [type="button"], [type="reset"], [role="button"]),
|
|
149
|
+
a[role="button"]:not([href]) {
|
|
150
|
+
opacity: 0.5;
|
|
151
|
+
pointer-events: none;
|
|
152
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
pre,
|
|
2
|
+
code,
|
|
3
|
+
kbd {
|
|
4
|
+
border-radius: var(--border-radius);
|
|
5
|
+
background: var(--code-background-color);
|
|
6
|
+
color: var(--code-color);
|
|
7
|
+
font-weight: var(--font-weight);
|
|
8
|
+
line-height: initial;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
code,
|
|
12
|
+
kbd {
|
|
13
|
+
display: inline-block;
|
|
14
|
+
padding: 0.375rem 0.5rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
pre {
|
|
18
|
+
display: block;
|
|
19
|
+
margin-bottom: var(--spacing);
|
|
20
|
+
overflow-x: auto;
|
|
21
|
+
|
|
22
|
+
> code {
|
|
23
|
+
display: block;
|
|
24
|
+
padding: var(--spacing);
|
|
25
|
+
background: none;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
line-height: var(--line-height);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Code Syntax
|
|
32
|
+
code {
|
|
33
|
+
// Tags
|
|
34
|
+
b {
|
|
35
|
+
color: var(--code-tag-color);
|
|
36
|
+
font-weight: var(--font-weight);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Properties
|
|
40
|
+
i {
|
|
41
|
+
color: var(--code-property-color);
|
|
42
|
+
font-style: normal;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Values
|
|
46
|
+
u {
|
|
47
|
+
color: var(--code-value-color);
|
|
48
|
+
text-decoration: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Comments
|
|
52
|
+
em {
|
|
53
|
+
color: var(--code-comment-color);
|
|
54
|
+
font-style: normal;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// kbd
|
|
59
|
+
kbd {
|
|
60
|
+
background-color: var(--code-kbd-background-color);
|
|
61
|
+
color: var(--code-kbd-color);
|
|
62
|
+
vertical-align: baseline;
|
|
63
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
// Color
|
|
2
|
+
[type="color"] {
|
|
3
|
+
// Wrapper
|
|
4
|
+
@mixin color-wrapper {
|
|
5
|
+
padding: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&::-webkit-color-swatch-wrapper {
|
|
9
|
+
@include color-wrapper;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&::-moz-focus-inner {
|
|
13
|
+
@include color-wrapper;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Swatch
|
|
17
|
+
@mixin color-swatch {
|
|
18
|
+
border: 0;
|
|
19
|
+
border-radius: calc(var(--border-radius) * 0.5);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&::-webkit-color-swatch {
|
|
23
|
+
@include color-swatch;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&::-moz-color-swatch {
|
|
27
|
+
@include color-swatch;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Date & Time
|
|
32
|
+
// :not() are needed to add Specificity and avoid !important on padding
|
|
33
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) {
|
|
34
|
+
&[type="date"],
|
|
35
|
+
&[type="datetime-local"],
|
|
36
|
+
&[type="month"],
|
|
37
|
+
&[type="time"],
|
|
38
|
+
&[type="week"] {
|
|
39
|
+
--icon-position: 0.75rem;
|
|
40
|
+
--icon-width: 1rem;
|
|
41
|
+
padding-right: calc(var(--icon-width) + var(--icon-position));
|
|
42
|
+
background-image: var(--icon-date);
|
|
43
|
+
background-position: center right var(--icon-position);
|
|
44
|
+
background-size: var(--icon-width) auto;
|
|
45
|
+
background-repeat: no-repeat;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Time
|
|
49
|
+
&[type="time"] {
|
|
50
|
+
background-image: var(--icon-time);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Calendar picker
|
|
55
|
+
[type="date"],
|
|
56
|
+
[type="datetime-local"],
|
|
57
|
+
[type="month"],
|
|
58
|
+
[type="time"],
|
|
59
|
+
[type="week"] {
|
|
60
|
+
&::-webkit-calendar-picker-indicator {
|
|
61
|
+
width: var(--icon-width);
|
|
62
|
+
margin-right: calc(var(--icon-width) * -1);
|
|
63
|
+
margin-left: var(--icon-position);
|
|
64
|
+
opacity: 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[dir="rtl"]
|
|
69
|
+
:is([type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"]) {
|
|
70
|
+
text-align: right;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// File
|
|
74
|
+
[type="file"] {
|
|
75
|
+
--color: var(--muted-color);
|
|
76
|
+
padding: calc(var(--form-element-spacing-vertical) * 0.5) 0;
|
|
77
|
+
border: 0;
|
|
78
|
+
border-radius: 0;
|
|
79
|
+
background: none;
|
|
80
|
+
|
|
81
|
+
@mixin file-selector-button {
|
|
82
|
+
--background-color: var(--secondary);
|
|
83
|
+
--border-color: var(--secondary);
|
|
84
|
+
--color: var(--secondary-inverse);
|
|
85
|
+
margin-right: calc(var(--spacing) / 2);
|
|
86
|
+
margin-left: 0;
|
|
87
|
+
margin-inline-start: 0;
|
|
88
|
+
margin-inline-end: calc(var(--spacing) / 2);
|
|
89
|
+
padding: calc(var(--form-element-spacing-vertical) * 0.5)
|
|
90
|
+
calc(var(--form-element-spacing-horizontal) * 0.5);
|
|
91
|
+
border: var(--border-width) solid var(--border-color);
|
|
92
|
+
border-radius: var(--border-radius);
|
|
93
|
+
outline: none;
|
|
94
|
+
background-color: var(--background-color);
|
|
95
|
+
box-shadow: var(--box-shadow);
|
|
96
|
+
color: var(--color);
|
|
97
|
+
font-weight: var(--font-weight);
|
|
98
|
+
font-size: 1rem;
|
|
99
|
+
line-height: var(--line-height);
|
|
100
|
+
text-align: center;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
|
|
103
|
+
@if $enable-transitions {
|
|
104
|
+
transition: background-color var(--transition),
|
|
105
|
+
border-color var(--transition), color var(--transition),
|
|
106
|
+
box-shadow var(--transition);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:is(:hover, :active, :focus) {
|
|
110
|
+
--background-color: var(--secondary-hover);
|
|
111
|
+
--border-color: var(--secondary-hover);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&::file-selector-button {
|
|
116
|
+
@include file-selector-button;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&::-webkit-file-upload-button {
|
|
120
|
+
@include file-selector-button;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&::-ms-browse {
|
|
124
|
+
@include file-selector-button;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Range
|
|
129
|
+
[type="range"] {
|
|
130
|
+
// Config
|
|
131
|
+
$height-track: 0.25rem;
|
|
132
|
+
$height-thumb: 1.25rem;
|
|
133
|
+
$border-thumb: 2px;
|
|
134
|
+
|
|
135
|
+
// Styles
|
|
136
|
+
-webkit-appearance: none;
|
|
137
|
+
-moz-appearance: none;
|
|
138
|
+
appearance: none;
|
|
139
|
+
width: 100%;
|
|
140
|
+
height: $height-thumb;
|
|
141
|
+
background: none;
|
|
142
|
+
|
|
143
|
+
// Slider Track
|
|
144
|
+
@mixin slider-track {
|
|
145
|
+
width: 100%;
|
|
146
|
+
height: $height-track;
|
|
147
|
+
border-radius: var(--border-radius);
|
|
148
|
+
background-color: var(--range-border-color);
|
|
149
|
+
|
|
150
|
+
@if $enable-transitions {
|
|
151
|
+
transition: background-color var(--transition),
|
|
152
|
+
box-shadow var(--transition);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&::-webkit-slider-runnable-track {
|
|
157
|
+
@include slider-track;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&::-moz-range-track {
|
|
161
|
+
@include slider-track;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&::-ms-track {
|
|
165
|
+
@include slider-track;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Slider Thumb
|
|
169
|
+
@mixin slider-thumb {
|
|
170
|
+
-webkit-appearance: none;
|
|
171
|
+
width: $height-thumb;
|
|
172
|
+
height: $height-thumb;
|
|
173
|
+
margin-top: #{(-($height-thumb * 0.5) + ($height-track * 0.5))};
|
|
174
|
+
border: $border-thumb solid var(--range-thumb-border-color);
|
|
175
|
+
border-radius: 50%;
|
|
176
|
+
background-color: var(--range-thumb-color);
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
|
|
179
|
+
@if $enable-transitions {
|
|
180
|
+
transition: background-color var(--transition),
|
|
181
|
+
transform var(--transition);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
&::-webkit-slider-thumb {
|
|
185
|
+
@include slider-thumb;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&::-moz-range-thumb {
|
|
189
|
+
@include slider-thumb;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&::-ms-thumb {
|
|
193
|
+
@include slider-thumb;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&:hover,
|
|
197
|
+
&:focus {
|
|
198
|
+
--range-border-color: var(--range-active-border-color);
|
|
199
|
+
--range-thumb-color: var(--range-thumb-hover-color);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&:active {
|
|
203
|
+
--range-thumb-color: var(--range-thumb-active-color);
|
|
204
|
+
|
|
205
|
+
// Slider Thumb
|
|
206
|
+
&::-webkit-slider-thumb {
|
|
207
|
+
transform: scale(1.25);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&::-moz-range-thumb {
|
|
211
|
+
transform: scale(1.25);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&::-ms-thumb {
|
|
215
|
+
transform: scale(1.25);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Search
|
|
221
|
+
// :not() are needed to add Specificity and avoid !important on padding
|
|
222
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) {
|
|
223
|
+
&[type="search"] {
|
|
224
|
+
padding-inline-start: calc(
|
|
225
|
+
var(--form-element-spacing-horizontal) + 1.75rem
|
|
226
|
+
);
|
|
227
|
+
border-radius: 5rem;
|
|
228
|
+
background-image: var(--icon-search);
|
|
229
|
+
background-position: center left 1.125rem;
|
|
230
|
+
background-size: 1rem auto;
|
|
231
|
+
background-repeat: no-repeat;
|
|
232
|
+
|
|
233
|
+
&[aria-invalid] {
|
|
234
|
+
@if $enable-important {
|
|
235
|
+
padding-inline-start: calc(
|
|
236
|
+
var(--form-element-spacing-horizontal) + 1.75rem
|
|
237
|
+
) !important;
|
|
238
|
+
} @else {
|
|
239
|
+
padding-inline-start: calc(
|
|
240
|
+
var(--form-element-spacing-horizontal) + 1.75rem
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
background-position: center left 1.125rem, center right 0.75rem;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&[aria-invalid="false"] {
|
|
247
|
+
background-image: var(--icon-search), var(--icon-valid);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
&[aria-invalid="true"] {
|
|
251
|
+
background-image: var(--icon-search), var(--icon-invalid);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Cancel button
|
|
257
|
+
[type="search"] {
|
|
258
|
+
&::-webkit-search-cancel-button {
|
|
259
|
+
-webkit-appearance: none;
|
|
260
|
+
display: none;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
[dir="rtl"] {
|
|
265
|
+
:where(input) {
|
|
266
|
+
&:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) {
|
|
267
|
+
&[type="search"] {
|
|
268
|
+
background-position: center right 1.125rem;
|
|
269
|
+
|
|
270
|
+
&[aria-invalid] {
|
|
271
|
+
background-position: center right 1.125rem, center left 0.75rem;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|