pico-rails 1.4.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.
- checksums.yaml +7 -0
- data/README.md +53 -0
- data/app/assets/stylesheets/pico.classless.scss +13 -0
- data/app/assets/stylesheets/pico.fluid.classless.scss +16 -0
- data/app/assets/stylesheets/pico.scss +42 -0
- data/app/assets/stylesheets/pico.slim.scss +47 -0
- data/app/assets/stylesheets/scss/_variables.scss +66 -0
- data/app/assets/stylesheets/scss/components/_accordion.scss +90 -0
- data/app/assets/stylesheets/scss/components/_card.scss +33 -0
- data/app/assets/stylesheets/scss/components/_modal.scss +175 -0
- data/app/assets/stylesheets/scss/components/_nav.scss +73 -0
- data/app/assets/stylesheets/scss/components/_progress.scss +81 -0
- data/app/assets/stylesheets/scss/content/_button.scss +227 -0
- data/app/assets/stylesheets/scss/content/_code.scss +91 -0
- data/app/assets/stylesheets/scss/content/_embedded.scss +53 -0
- data/app/assets/stylesheets/scss/content/_form-alt-input-types.scss +258 -0
- data/app/assets/stylesheets/scss/content/_form-checkbox-radio.scss +138 -0
- data/app/assets/stylesheets/scss/content/_form.scss +361 -0
- data/app/assets/stylesheets/scss/content/_miscs.scss +33 -0
- data/app/assets/stylesheets/scss/content/_table.scss +52 -0
- data/app/assets/stylesheets/scss/content/_typography.scss +292 -0
- data/app/assets/stylesheets/scss/layout/_container.scss +42 -0
- data/app/assets/stylesheets/scss/layout/_document.scss +45 -0
- data/app/assets/stylesheets/scss/layout/_grid.scss +24 -0
- data/app/assets/stylesheets/scss/layout/_scroller.scss +16 -0
- data/app/assets/stylesheets/scss/layout/_section.scss +8 -0
- data/app/assets/stylesheets/scss/layout/_sectioning.scss +69 -0
- data/app/assets/stylesheets/scss/themes/default/_colors.scss +65 -0
- data/app/assets/stylesheets/scss/themes/default/_dark.scss +139 -0
- data/app/assets/stylesheets/scss/themes/default/_light.scss +139 -0
- data/app/assets/stylesheets/scss/themes/default/_styles.scss +238 -0
- data/app/assets/stylesheets/scss/themes/default.scss +29 -0
- data/app/assets/stylesheets/scss/utilities/_accessibility.scss +54 -0
- data/app/assets/stylesheets/scss/utilities/_loading.scss +58 -0
- data/app/assets/stylesheets/scss/utilities/_reduce-motion.scss +29 -0
- data/app/assets/stylesheets/scss/utilities/_tooltip.scss +105 -0
- data/lib/pico/engine.rb +4 -0
- data/lib/pico/version.rb +3 -0
- data/lib/pico-rails.rb +5 -0
- data/pico-rails.gemspec +16 -0
- metadata +97 -0
@@ -0,0 +1,139 @@
|
|
1
|
+
// Default: Dark theme
|
2
|
+
@mixin dark {
|
3
|
+
// Document
|
4
|
+
color-scheme: dark;
|
5
|
+
--background-color: #{mix($black, $grey-900, 37.5%)};
|
6
|
+
|
7
|
+
// Texts colors
|
8
|
+
--color: #{$grey-200};
|
9
|
+
--h1-color: #{$grey-50};
|
10
|
+
--h2-color: #{mix($grey-100, $grey-50)};
|
11
|
+
--h3-color: #{$grey-100};
|
12
|
+
--h4-color: #{mix($grey-200, $grey-100)};
|
13
|
+
--h5-color: #{$grey-200};
|
14
|
+
--h6-color: #{mix($grey-300, $grey-200)};
|
15
|
+
|
16
|
+
// Muted colors
|
17
|
+
--muted-color: #{$grey-500};
|
18
|
+
--muted-border-color: #{mix($grey-900, $grey-800, 75%)};
|
19
|
+
|
20
|
+
// Primary colors
|
21
|
+
--primary: #{$primary-600};
|
22
|
+
--primary-hover: #{$primary-500};
|
23
|
+
--primary-focus: #{rgba($primary-600, 0.25)};
|
24
|
+
--primary-inverse: #{$white};
|
25
|
+
|
26
|
+
// Secondary colors
|
27
|
+
--secondary: #{$grey-600};
|
28
|
+
--secondary-hover: #{$grey-500};
|
29
|
+
--secondary-focus: #{rgba($grey-500, 0.25)};
|
30
|
+
--secondary-inverse: #{$white};
|
31
|
+
|
32
|
+
// Contrast colors
|
33
|
+
--contrast: #{$grey-50};
|
34
|
+
--contrast-hover: #{$white};
|
35
|
+
--contrast-focus: #{rgba($grey-500, 0.25)};
|
36
|
+
--contrast-inverse: #{$black};
|
37
|
+
|
38
|
+
// Highlighted text (<mark>)
|
39
|
+
--mark-background-color: #{mix($grey-300, $amber-300)};
|
40
|
+
--mark-color: #{mix($black, $grey-900, 37.5%)};
|
41
|
+
|
42
|
+
// Inserted (<ins>) & Deleted (<ins>)
|
43
|
+
--ins-color: #{$green-700};
|
44
|
+
--del-color: #{$red-800};
|
45
|
+
|
46
|
+
// Blockquote
|
47
|
+
--blockquote-border-color: var(--muted-border-color);
|
48
|
+
--blockquote-footer-color: var(--muted-color);
|
49
|
+
|
50
|
+
// Button
|
51
|
+
// To disable box-shadow, remove the var or set to '0 0 0 rgba(0, 0, 0, 0)'
|
52
|
+
// Don't use, 'none, 'false, 'null', '0', etc.
|
53
|
+
--button-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
54
|
+
--button-hover-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
55
|
+
|
56
|
+
// Form elements
|
57
|
+
--form-element-background-color: #{mix($black, $grey-900, 37.5%)};
|
58
|
+
--form-element-border-color: #{mix($grey-800, $grey-700)};
|
59
|
+
--form-element-color: var(--color);
|
60
|
+
--form-element-placeholder-color: var(--muted-color);
|
61
|
+
--form-element-active-background-color: var(--form-element-background-color);
|
62
|
+
--form-element-active-border-color: var(--primary);
|
63
|
+
--form-element-focus-color: var(--primary-focus);
|
64
|
+
--form-element-disabled-background-color: #{$grey-800};
|
65
|
+
--form-element-disabled-border-color: #{$grey-700};
|
66
|
+
--form-element-disabled-opacity: 0.5;
|
67
|
+
--form-element-invalid-border-color: #{$red-900};
|
68
|
+
--form-element-invalid-active-border-color: #{$red-800};
|
69
|
+
--form-element-invalid-focus-color: #{rgba($red-800, 0.25)};
|
70
|
+
--form-element-valid-border-color: #{$green-800};
|
71
|
+
--form-element-valid-active-border-color: #{$green-700};
|
72
|
+
--form-element-valid-focus-color: #{rgba($green-700, 0.25)};
|
73
|
+
|
74
|
+
// Switch (input[type="checkbox"][role="switch"])
|
75
|
+
--switch-background-color: #{mix($grey-800, $grey-700)};
|
76
|
+
--switch-color: var(--primary-inverse);
|
77
|
+
--switch-checked-background-color: var(--primary);
|
78
|
+
|
79
|
+
// Range (input[type="range"])
|
80
|
+
--range-border-color: #{mix($grey-900, $grey-800)};
|
81
|
+
--range-active-border-color: #{$grey-800};
|
82
|
+
--range-thumb-border-color: var(--background-color);
|
83
|
+
--range-thumb-color: var(--secondary);
|
84
|
+
--range-thumb-hover-color: var(--secondary-hover);
|
85
|
+
--range-thumb-active-color: var(--primary);
|
86
|
+
|
87
|
+
// Table
|
88
|
+
--table-border-color: var(--muted-border-color);
|
89
|
+
--table-row-stripped-background-color: #{rgba($grey-500, 0.05)};
|
90
|
+
|
91
|
+
// Code
|
92
|
+
--code-background-color: #{mix($black, $grey-900, 12.5%)};
|
93
|
+
--code-color: var(--muted-color);
|
94
|
+
--code-kbd-background-color: var(--contrast);
|
95
|
+
--code-kbd-color: var(--contrast-inverse);
|
96
|
+
--code-tag-color: #{hsl(330, 30%, 50%)};
|
97
|
+
--code-property-color: #{hsl(185, 30%, 50%)};
|
98
|
+
--code-value-color: #{hsl(40, 10%, 50%)};
|
99
|
+
--code-comment-color: #{mix($grey-700, $grey-600)};
|
100
|
+
|
101
|
+
// Accordion (<details>)
|
102
|
+
--accordion-border-color: var(--muted-border-color);
|
103
|
+
--accordion-active-summary-color: var(--primary);
|
104
|
+
--accordion-close-summary-color: var(--color);
|
105
|
+
--accordion-open-summary-color: var(--muted-color);
|
106
|
+
|
107
|
+
// Card (<article>)
|
108
|
+
--card-background-color: #{mix($black, $grey-900, 25%)};
|
109
|
+
--card-border-color: #{mix($black, $grey-900, 37.5%)};
|
110
|
+
--card-box-shadow: 0 0.125rem 1rem #{rgba($black, 0.06)},
|
111
|
+
0 0.125rem 2rem #{rgba($black, 0.12)},
|
112
|
+
0 0 0 0.0625rem #{rgba($black, 0.036)};
|
113
|
+
--card-sectionning-background-color: #{mix($black, $grey-900, 12.5%)};
|
114
|
+
|
115
|
+
// Modal (<dialog>)
|
116
|
+
--modal-overlay-background-color: #{rgba(mix($grey-900, $grey-800), 0.9)};
|
117
|
+
|
118
|
+
// Progress
|
119
|
+
--progress-background-color: #{mix($grey-900, $grey-800)};
|
120
|
+
--progress-color: var(--primary);
|
121
|
+
|
122
|
+
// Loading ([aria-busy=true])
|
123
|
+
--loading-spinner-opacity: 0.5;
|
124
|
+
|
125
|
+
// Tooltip ([data-tooltip])
|
126
|
+
--tooltip-background-color: var(--contrast);
|
127
|
+
--tooltip-color: var(--contrast-inverse);
|
128
|
+
|
129
|
+
// Icons
|
130
|
+
--icon-checkbox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
131
|
+
--icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($grey-300, .999)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
132
|
+
--icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($grey-500, .999)}' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
|
133
|
+
--icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($grey-300, .999)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
|
134
|
+
--icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($red-900, .999)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
|
135
|
+
--icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
|
136
|
+
--icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($grey-300, .999)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
|
137
|
+
--icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($grey-300, .999)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
|
138
|
+
--icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($green-800, .999)}' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
139
|
+
}
|
@@ -0,0 +1,139 @@
|
|
1
|
+
// Default: Light theme
|
2
|
+
[data-theme="light"],
|
3
|
+
:root:not([data-theme="dark"]) {
|
4
|
+
// Document
|
5
|
+
color-scheme: light;
|
6
|
+
--background-color: #{$white};
|
7
|
+
|
8
|
+
// Texts colors
|
9
|
+
--color: #{$grey-700};
|
10
|
+
--h1-color: #{$grey-900};
|
11
|
+
--h2-color: #{mix($grey-900, $grey-800)};
|
12
|
+
--h3-color: #{$grey-800};
|
13
|
+
--h4-color: #{mix($grey-800, $grey-700)};
|
14
|
+
--h5-color: #{$grey-700};
|
15
|
+
--h6-color: #{mix($grey-700, $grey-600)};
|
16
|
+
|
17
|
+
// Muted colors
|
18
|
+
--muted-color: #{$grey-500};
|
19
|
+
--muted-border-color: #{$grey-50};
|
20
|
+
|
21
|
+
// Primary colors
|
22
|
+
--primary: #{$primary-600};
|
23
|
+
--primary-hover: #{$primary-700};
|
24
|
+
--primary-focus: #{rgba($primary-600, 0.125)};
|
25
|
+
--primary-inverse: #{$white};
|
26
|
+
|
27
|
+
// Secondary colors
|
28
|
+
--secondary: #{$grey-600};
|
29
|
+
--secondary-hover: #{$grey-700};
|
30
|
+
--secondary-focus: #{rgba($grey-600, 0.125)};
|
31
|
+
--secondary-inverse: #{$white};
|
32
|
+
|
33
|
+
// Contrast colors
|
34
|
+
--contrast: #{$grey-900};
|
35
|
+
--contrast-hover: #{$black};
|
36
|
+
--contrast-focus: #{rgba($grey-600, 0.125)};
|
37
|
+
--contrast-inverse: #{$white};
|
38
|
+
|
39
|
+
// Highlighted text (<mark>)
|
40
|
+
--mark-background-color: #{mix($amber-100, $amber-50)};
|
41
|
+
--mark-color: #{mix($grey-900, $amber-900, 75%)};
|
42
|
+
|
43
|
+
// Inserted (<ins>) & Deleted (<ins>)
|
44
|
+
--ins-color: #{$green-700};
|
45
|
+
--del-color: #{$red-800};
|
46
|
+
|
47
|
+
// Blockquote
|
48
|
+
--blockquote-border-color: var(--muted-border-color);
|
49
|
+
--blockquote-footer-color: var(--muted-color);
|
50
|
+
|
51
|
+
// Button
|
52
|
+
// To disable box-shadow, remove the var or set to '0 0 0 rgba(0, 0, 0, 0)'
|
53
|
+
// Don't use, 'none, 'false, 'null', '0', etc.
|
54
|
+
--button-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
55
|
+
--button-hover-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
56
|
+
|
57
|
+
// Form elements
|
58
|
+
--form-element-background-color: transparent;
|
59
|
+
--form-element-border-color: #{$grey-300};
|
60
|
+
--form-element-color: var(--color);
|
61
|
+
--form-element-placeholder-color: var(--muted-color);
|
62
|
+
--form-element-active-background-color: transparent;
|
63
|
+
--form-element-active-border-color: var(--primary);
|
64
|
+
--form-element-focus-color: var(--primary-focus);
|
65
|
+
--form-element-disabled-background-color: #{$grey-100};
|
66
|
+
--form-element-disabled-border-color: #{$grey-300};
|
67
|
+
--form-element-disabled-opacity: 0.5;
|
68
|
+
--form-element-invalid-border-color: #{$red-800};
|
69
|
+
--form-element-invalid-active-border-color: #{$red-700};
|
70
|
+
--form-element-invalid-focus-color: #{rgba($red-700, 0.125)};
|
71
|
+
--form-element-valid-border-color: #{$green-700};
|
72
|
+
--form-element-valid-active-border-color: #{$green-600};
|
73
|
+
--form-element-valid-focus-color: #{rgba($green-600, 0.125)};
|
74
|
+
|
75
|
+
// Switch (input[type="checkbox"][role="switch"])
|
76
|
+
--switch-background-color: #{$grey-200};
|
77
|
+
--switch-color: var(--primary-inverse);
|
78
|
+
--switch-checked-background-color: var(--primary);
|
79
|
+
|
80
|
+
// Range (input[type="range"])
|
81
|
+
--range-border-color: #{$grey-100};
|
82
|
+
--range-active-border-color: #{$grey-200};
|
83
|
+
--range-thumb-border-color: var(--background-color);
|
84
|
+
--range-thumb-color: var(--secondary);
|
85
|
+
--range-thumb-hover-color: var(--secondary-hover);
|
86
|
+
--range-thumb-active-color: var(--primary);
|
87
|
+
|
88
|
+
// Table
|
89
|
+
--table-border-color: var(--muted-border-color);
|
90
|
+
--table-row-stripped-background-color: #{mix($grey-50, $white)};
|
91
|
+
|
92
|
+
// Code
|
93
|
+
--code-background-color: #{$grey-50};
|
94
|
+
--code-color: var(--muted-color);
|
95
|
+
--code-kbd-background-color: var(--contrast);
|
96
|
+
--code-kbd-color: var(--contrast-inverse);
|
97
|
+
--code-tag-color: #{hsl(330, 40%, 50%)};
|
98
|
+
--code-property-color: #{hsl(185, 40%, 40%)};
|
99
|
+
--code-value-color: #{hsl(40, 20%, 50%)};
|
100
|
+
--code-comment-color: #{$grey-300};
|
101
|
+
|
102
|
+
// Accordion (<details>)
|
103
|
+
--accordion-border-color: var(--muted-border-color);
|
104
|
+
--accordion-close-summary-color: var(--color);
|
105
|
+
--accordion-open-summary-color: var(--muted-color);
|
106
|
+
|
107
|
+
// Card (<article>)
|
108
|
+
--card-background-color: var(--background-color);
|
109
|
+
--card-border-color: var(--muted-border-color);
|
110
|
+
--card-box-shadow: 0 0.125rem 1rem #{rgba($grey-900, 0.04)},
|
111
|
+
0 0.125rem 2rem #{rgba($grey-900, 0.08)},
|
112
|
+
0 0 0 0.0625rem #{rgba($grey-900, 0.024)};
|
113
|
+
--card-sectionning-background-color: #{mix($grey-50, $white, 25%)};
|
114
|
+
|
115
|
+
// Modal (<dialog>)
|
116
|
+
--modal-overlay-background-color: #{rgba($grey-100, 0.8)};
|
117
|
+
|
118
|
+
// Progress
|
119
|
+
--progress-background-color: #{$grey-100};
|
120
|
+
--progress-color: var(--primary);
|
121
|
+
|
122
|
+
// Loading ([aria-busy=true])
|
123
|
+
--loading-spinner-opacity: 0.5;
|
124
|
+
|
125
|
+
// Tooltip ([data-tooltip])
|
126
|
+
--tooltip-background-color: var(--contrast);
|
127
|
+
--tooltip-color: var(--contrast-inverse);
|
128
|
+
|
129
|
+
// Icons
|
130
|
+
--icon-checkbox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
131
|
+
--icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($grey-700, .999)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
132
|
+
--icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($grey-500, .999)}' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
|
133
|
+
--icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($grey-700, .999)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
|
134
|
+
--icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($red-800, .999)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
|
135
|
+
--icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
|
136
|
+
--icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($grey-700, .999)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
|
137
|
+
--icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($grey-700, .999)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
|
138
|
+
--icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{rgba($green-700, .999)}' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
139
|
+
}
|
@@ -0,0 +1,238 @@
|
|
1
|
+
// Commons Styles
|
2
|
+
:root {
|
3
|
+
// Typography
|
4
|
+
--font-family: system-ui, -apple-system, "Segoe UI", "Roboto", "Ubuntu",
|
5
|
+
"Cantarell", "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
|
6
|
+
"Segoe UI Symbol", "Noto Color Emoji";
|
7
|
+
--line-height: 1.5;
|
8
|
+
--font-weight: 400;
|
9
|
+
--font-size: 16px;
|
10
|
+
|
11
|
+
// Responsive typography
|
12
|
+
@if $enable-responsive-typography {
|
13
|
+
@if map-get($breakpoints, "sm") {
|
14
|
+
@media (min-width: map-get($breakpoints, "sm")) {
|
15
|
+
--font-size: 17px;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
@if map-get($breakpoints, "md") {
|
20
|
+
@media (min-width: map-get($breakpoints, "md")) {
|
21
|
+
--font-size: 18px;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
@if map-get($breakpoints, "lg") {
|
26
|
+
@media (min-width: map-get($breakpoints, "lg")) {
|
27
|
+
--font-size: 19px;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
@if map-get($breakpoints, "xl") {
|
32
|
+
@media (min-width: map-get($breakpoints, "xl")) {
|
33
|
+
--font-size: 20px;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
// Borders
|
39
|
+
--border-radius: 0.25rem;
|
40
|
+
--border-width: 1px;
|
41
|
+
--outline-width: 3px;
|
42
|
+
|
43
|
+
// Spacings
|
44
|
+
--spacing: 1rem;
|
45
|
+
|
46
|
+
// Spacings for typography elements
|
47
|
+
--typography-spacing-vertical: 1.5rem;
|
48
|
+
|
49
|
+
// Spacings for body > header, body > main, body > footer, section, article
|
50
|
+
--block-spacing-vertical: calc(var(--spacing) * 2);
|
51
|
+
--block-spacing-horizontal: var(--spacing);
|
52
|
+
|
53
|
+
@if ($enable-classes and $enable-grid) {
|
54
|
+
--grid-spacing-vertical: 0;
|
55
|
+
--grid-spacing-horizontal: var(--spacing);
|
56
|
+
}
|
57
|
+
|
58
|
+
// Spacings for form elements and button
|
59
|
+
--form-element-spacing-vertical: 0.75rem;
|
60
|
+
--form-element-spacing-horizontal: 1rem;
|
61
|
+
|
62
|
+
// Font weight for form labels & fieldsets legend
|
63
|
+
--form-label-font-weight: var(--font-weight);
|
64
|
+
|
65
|
+
// Transitions
|
66
|
+
--transition: 0.2s ease-in-out;
|
67
|
+
}
|
68
|
+
|
69
|
+
// Responsives spacings
|
70
|
+
@if $enable-responsive-spacings {
|
71
|
+
// Sectionning
|
72
|
+
body > header,
|
73
|
+
body > main,
|
74
|
+
body > footer,
|
75
|
+
section {
|
76
|
+
@if map-get($breakpoints, "sm") {
|
77
|
+
@media (min-width: map-get($breakpoints, "sm")) {
|
78
|
+
--block-spacing-vertical: calc(var(--spacing) * 2.5);
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
@if map-get($breakpoints, "md") {
|
83
|
+
@media (min-width: map-get($breakpoints, "md")) {
|
84
|
+
--block-spacing-vertical: calc(var(--spacing) * 3);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
@if map-get($breakpoints, "lg") {
|
89
|
+
@media (min-width: map-get($breakpoints, "lg")) {
|
90
|
+
--block-spacing-vertical: calc(var(--spacing) * 3.5);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
@if map-get($breakpoints, "xl") {
|
95
|
+
@media (min-width: map-get($breakpoints, "xl")) {
|
96
|
+
--block-spacing-vertical: calc(var(--spacing) * 4);
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
// Card (<article>)
|
102
|
+
article {
|
103
|
+
@if map-get($breakpoints, "sm") {
|
104
|
+
@media (min-width: map-get($breakpoints, "sm")) {
|
105
|
+
--block-spacing-horizontal: calc(var(--spacing) * 1.25);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
@if map-get($breakpoints, "md") {
|
110
|
+
@media (min-width: map-get($breakpoints, "md")) {
|
111
|
+
--block-spacing-horizontal: calc(var(--spacing) * 1.5);
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
@if map-get($breakpoints, "lg") {
|
116
|
+
@media (min-width: map-get($breakpoints, "lg")) {
|
117
|
+
--block-spacing-horizontal: calc(var(--spacing) * 1.75);
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
@if map-get($breakpoints, "xl") {
|
122
|
+
@media (min-width: map-get($breakpoints, "xl")) {
|
123
|
+
--block-spacing-horizontal: calc(var(--spacing) * 2);
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
// Modal
|
129
|
+
dialog > article {
|
130
|
+
|
131
|
+
--block-spacing-vertical: calc(var(--spacing) * 2);
|
132
|
+
--block-spacing-horizontal: var(--spacing);
|
133
|
+
|
134
|
+
@if map-get($breakpoints, "sm") {
|
135
|
+
@media (min-width: map-get($breakpoints, "sm")) {
|
136
|
+
--block-spacing-vertical: calc(var(--spacing) * 2.5);
|
137
|
+
--block-spacing-horizontal: calc(var(--spacing) * 1.25);
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
@if map-get($breakpoints, "md") {
|
142
|
+
@media (min-width: map-get($breakpoints, "md")) {
|
143
|
+
--block-spacing-vertical: calc(var(--spacing) * 3);
|
144
|
+
--block-spacing-horizontal: calc(var(--spacing) * 1.5);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
// Link
|
151
|
+
a {
|
152
|
+
--text-decoration: none;
|
153
|
+
|
154
|
+
// Secondary & Contrast
|
155
|
+
@if $enable-classes {
|
156
|
+
&.secondary,
|
157
|
+
&.contrast {
|
158
|
+
--text-decoration: underline;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
}
|
162
|
+
|
163
|
+
// Small
|
164
|
+
small {
|
165
|
+
--font-size: 0.875em;
|
166
|
+
}
|
167
|
+
|
168
|
+
// Headings
|
169
|
+
h1,
|
170
|
+
h2,
|
171
|
+
h3,
|
172
|
+
h4,
|
173
|
+
h5,
|
174
|
+
h6 {
|
175
|
+
--font-weight: 700;
|
176
|
+
}
|
177
|
+
|
178
|
+
h1 {
|
179
|
+
--font-size: 2rem;
|
180
|
+
--typography-spacing-vertical: 3rem;
|
181
|
+
}
|
182
|
+
|
183
|
+
h2 {
|
184
|
+
--font-size: 1.75rem;
|
185
|
+
--typography-spacing-vertical: 2.625rem;
|
186
|
+
}
|
187
|
+
|
188
|
+
h3 {
|
189
|
+
--font-size: 1.5rem;
|
190
|
+
--typography-spacing-vertical: 2.25rem;
|
191
|
+
}
|
192
|
+
|
193
|
+
h4 {
|
194
|
+
--font-size: 1.25rem;
|
195
|
+
--typography-spacing-vertical: 1.874rem;
|
196
|
+
}
|
197
|
+
|
198
|
+
h5 {
|
199
|
+
--font-size: 1.125rem;
|
200
|
+
--typography-spacing-vertical: 1.6875rem;
|
201
|
+
}
|
202
|
+
|
203
|
+
// Forms elements
|
204
|
+
[type="checkbox"],
|
205
|
+
[type="radio"] {
|
206
|
+
--border-width: 2px;
|
207
|
+
}
|
208
|
+
|
209
|
+
[type="checkbox"][role="switch"] {
|
210
|
+
--border-width: 3px;
|
211
|
+
}
|
212
|
+
|
213
|
+
// Table
|
214
|
+
thead,
|
215
|
+
tfoot {
|
216
|
+
th,
|
217
|
+
td {
|
218
|
+
--border-width: 3px;
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
222
|
+
:not(thead):not(tfoot) > * > td {
|
223
|
+
--font-size: 0.875em;
|
224
|
+
}
|
225
|
+
|
226
|
+
// Code
|
227
|
+
pre,
|
228
|
+
code,
|
229
|
+
kbd,
|
230
|
+
samp {
|
231
|
+
--font-family: "Menlo", "Consolas", "Roboto Mono", "Ubuntu Monospace",
|
232
|
+
"Noto Mono", "Oxygen Mono", "Liberation Mono", monospace,
|
233
|
+
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
234
|
+
}
|
235
|
+
|
236
|
+
kbd {
|
237
|
+
--font-weight: bolder;
|
238
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* Theme: default
|
3
|
+
*/
|
4
|
+
|
5
|
+
// Variables
|
6
|
+
@import "../variables";
|
7
|
+
@import "default/colors";
|
8
|
+
|
9
|
+
// Commons styles
|
10
|
+
@import "default/styles";
|
11
|
+
|
12
|
+
// Light theme (Default)
|
13
|
+
// Can be forced with data-theme="light"
|
14
|
+
@import "default/light";
|
15
|
+
|
16
|
+
// Dark theme (Auto)
|
17
|
+
// Automatically enabled if user has Dark mode enabled
|
18
|
+
@import "default/dark";
|
19
|
+
@media only screen and (prefers-color-scheme: dark) {
|
20
|
+
:root:not([data-theme="light"]) {
|
21
|
+
@include dark;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
// Dark theme (Forced)
|
26
|
+
// Enabled if forced with data-theme="dark"
|
27
|
+
[data-theme="dark"] {
|
28
|
+
@include dark;
|
29
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
/**
|
2
|
+
* Accessibility & User interaction
|
3
|
+
*/
|
4
|
+
|
5
|
+
|
6
|
+
// Based on :
|
7
|
+
// - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
|
8
|
+
// - sanitize.css v12.0.1 | CC0 1.0 Universal | github.com/csstools/sanitize.css
|
9
|
+
// ––––––––––––––––––––
|
10
|
+
|
11
|
+
// Accessibility
|
12
|
+
|
13
|
+
// Change the cursor on control elements in all browsers (opinionated)
|
14
|
+
[aria-controls] {
|
15
|
+
cursor: pointer;
|
16
|
+
}
|
17
|
+
|
18
|
+
// Change the cursor on disabled, not-editable, or otherwise inoperable elements in all browsers (opinionated)
|
19
|
+
[aria-disabled="true"],
|
20
|
+
[disabled] {
|
21
|
+
cursor: not-allowed;
|
22
|
+
}
|
23
|
+
|
24
|
+
// Change the display on visually hidden accessible elements in all browsers (opinionated)
|
25
|
+
[aria-hidden="false"][hidden] {
|
26
|
+
display: initial;
|
27
|
+
}
|
28
|
+
|
29
|
+
[aria-hidden="false"][hidden]:not(:focus) {
|
30
|
+
clip: rect(0, 0, 0, 0);
|
31
|
+
position: absolute;
|
32
|
+
}
|
33
|
+
|
34
|
+
// User interaction
|
35
|
+
// Remove the tapping delay in IE 10
|
36
|
+
a,
|
37
|
+
area,
|
38
|
+
button,
|
39
|
+
input,
|
40
|
+
label,
|
41
|
+
select,
|
42
|
+
summary,
|
43
|
+
textarea,
|
44
|
+
[tabindex] {
|
45
|
+
-ms-touch-action: manipulation;
|
46
|
+
}
|
47
|
+
|
48
|
+
|
49
|
+
// Pico
|
50
|
+
// ––––––––––––––––––––
|
51
|
+
|
52
|
+
[dir="rtl"] {
|
53
|
+
direction: rtl;
|
54
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
/**
|
2
|
+
* Loading ([aria-busy=true])
|
3
|
+
*/
|
4
|
+
|
5
|
+
|
6
|
+
// Cursor
|
7
|
+
[aria-busy="true"] {
|
8
|
+
cursor: progress;
|
9
|
+
}
|
10
|
+
|
11
|
+
// Everyting except form elements
|
12
|
+
[aria-busy="true"]:not(input):not(select):not(textarea) {
|
13
|
+
|
14
|
+
&::before {
|
15
|
+
display: inline-block;
|
16
|
+
width: 1em;
|
17
|
+
height: 1em;
|
18
|
+
border: 0.1875em solid currentColor;
|
19
|
+
border-radius: 1em;
|
20
|
+
border-right-color: transparent;
|
21
|
+
content: '';
|
22
|
+
vertical-align: text-bottom;
|
23
|
+
vertical-align: -.125em; // Visual alignment
|
24
|
+
animation: spinner 0.75s linear infinite;
|
25
|
+
opacity: var(--loading-spinner-opacity);
|
26
|
+
}
|
27
|
+
|
28
|
+
&:not(:empty) {
|
29
|
+
&::before {
|
30
|
+
margin-right: calc(var(--spacing) * 0.5);
|
31
|
+
margin-left: 0;
|
32
|
+
margin-inline-start: 0;
|
33
|
+
margin-inline-end: calc(var(--spacing) * 0.5);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
&:empty {
|
38
|
+
text-align: center;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
// Buttons and links
|
43
|
+
button,
|
44
|
+
input[type="submit"],
|
45
|
+
input[type="button"],
|
46
|
+
input[type="reset"],
|
47
|
+
a {
|
48
|
+
&[aria-busy="true"] {
|
49
|
+
pointer-events: none;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
// Animation: rotate
|
54
|
+
@keyframes spinner {
|
55
|
+
to {
|
56
|
+
transform: rotate(360deg);
|
57
|
+
}
|
58
|
+
}
|