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.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +53 -0
  3. data/app/assets/stylesheets/pico.classless.scss +13 -0
  4. data/app/assets/stylesheets/pico.fluid.classless.scss +16 -0
  5. data/app/assets/stylesheets/pico.scss +42 -0
  6. data/app/assets/stylesheets/pico.slim.scss +47 -0
  7. data/app/assets/stylesheets/scss/_variables.scss +66 -0
  8. data/app/assets/stylesheets/scss/components/_accordion.scss +90 -0
  9. data/app/assets/stylesheets/scss/components/_card.scss +33 -0
  10. data/app/assets/stylesheets/scss/components/_modal.scss +175 -0
  11. data/app/assets/stylesheets/scss/components/_nav.scss +73 -0
  12. data/app/assets/stylesheets/scss/components/_progress.scss +81 -0
  13. data/app/assets/stylesheets/scss/content/_button.scss +227 -0
  14. data/app/assets/stylesheets/scss/content/_code.scss +91 -0
  15. data/app/assets/stylesheets/scss/content/_embedded.scss +53 -0
  16. data/app/assets/stylesheets/scss/content/_form-alt-input-types.scss +258 -0
  17. data/app/assets/stylesheets/scss/content/_form-checkbox-radio.scss +138 -0
  18. data/app/assets/stylesheets/scss/content/_form.scss +361 -0
  19. data/app/assets/stylesheets/scss/content/_miscs.scss +33 -0
  20. data/app/assets/stylesheets/scss/content/_table.scss +52 -0
  21. data/app/assets/stylesheets/scss/content/_typography.scss +292 -0
  22. data/app/assets/stylesheets/scss/layout/_container.scss +42 -0
  23. data/app/assets/stylesheets/scss/layout/_document.scss +45 -0
  24. data/app/assets/stylesheets/scss/layout/_grid.scss +24 -0
  25. data/app/assets/stylesheets/scss/layout/_scroller.scss +16 -0
  26. data/app/assets/stylesheets/scss/layout/_section.scss +8 -0
  27. data/app/assets/stylesheets/scss/layout/_sectioning.scss +69 -0
  28. data/app/assets/stylesheets/scss/themes/default/_colors.scss +65 -0
  29. data/app/assets/stylesheets/scss/themes/default/_dark.scss +139 -0
  30. data/app/assets/stylesheets/scss/themes/default/_light.scss +139 -0
  31. data/app/assets/stylesheets/scss/themes/default/_styles.scss +238 -0
  32. data/app/assets/stylesheets/scss/themes/default.scss +29 -0
  33. data/app/assets/stylesheets/scss/utilities/_accessibility.scss +54 -0
  34. data/app/assets/stylesheets/scss/utilities/_loading.scss +58 -0
  35. data/app/assets/stylesheets/scss/utilities/_reduce-motion.scss +29 -0
  36. data/app/assets/stylesheets/scss/utilities/_tooltip.scss +105 -0
  37. data/lib/pico/engine.rb +4 -0
  38. data/lib/pico/version.rb +3 -0
  39. data/lib/pico-rails.rb +5 -0
  40. data/pico-rails.gemspec +16 -0
  41. metadata +97 -0
@@ -0,0 +1,292 @@
1
+ /**
2
+ * Typography
3
+ */
4
+
5
+ // Reboot based on :
6
+ // - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
7
+ // - sanitize.css v12.0.1 | CC0 1.0 Universal | github.com/csstools/sanitize.css
8
+ // ––––––––––––––––––––
9
+
10
+ // Add the correct font weight in Chrome, Edge, and Safari
11
+ b,
12
+ strong {
13
+ font-weight: bolder;
14
+ }
15
+
16
+ // Prevent `sub` and `sup` elements from affecting the line height in all browsers
17
+ sub,
18
+ sup {
19
+ position: relative;
20
+ font-size: 0.75em;
21
+ line-height: 0;
22
+ vertical-align: baseline;
23
+ }
24
+ sub {
25
+ bottom: -0.25em;
26
+ }
27
+ sup {
28
+ top: -0.5em;
29
+ }
30
+
31
+ // Remove the margin on nested lists in Chrome, Edge, IE, and Safari
32
+ dl dl,
33
+ dl ol,
34
+ dl ul,
35
+ ol dl,
36
+ ul dl {
37
+ margin: 0;
38
+ }
39
+
40
+ // Remove the margin on nested lists in Edge 18- and IE
41
+ ol ol,
42
+ ol ul,
43
+ ul ol,
44
+ ul ul {
45
+ margin: 0;
46
+ }
47
+
48
+ // Pico
49
+ // ––––––––––––––––––––
50
+
51
+ address,
52
+ blockquote,
53
+ dl,
54
+ figure,
55
+ form,
56
+ ol,
57
+ p,
58
+ pre,
59
+ table,
60
+ ul {
61
+ margin-top: 0;
62
+ margin-bottom: var(--typography-spacing-vertical);
63
+ color: var(--color);
64
+ font-style: normal;
65
+ font-weight: var(--font-weight);
66
+ font-size: var(--font-size);
67
+ }
68
+
69
+ // Links
70
+ // 1. Remove the gray background on active links in IE 10
71
+ a {
72
+ --color: var(--primary);
73
+ --background-color: transparent;
74
+ outline: none;
75
+ background-color: var(--background-color); // 1
76
+ color: var(--color);
77
+ text-decoration: var(--text-decoration);
78
+
79
+ @if $enable-transitions {
80
+ transition: background-color var(--transition), color var(--transition),
81
+ text-decoration var(--transition), box-shadow var(--transition);
82
+ }
83
+
84
+ &:hover,
85
+ &:active,
86
+ &:focus {
87
+ --color: var(--primary-hover);
88
+ --text-decoration: underline;
89
+ }
90
+
91
+ &:focus {
92
+ --background-color: var(--primary-focus);
93
+ }
94
+
95
+ @if $enable-classes {
96
+ // Secondary
97
+ &.secondary {
98
+ --color: var(--secondary);
99
+
100
+ &:hover,
101
+ &:active,
102
+ &:focus {
103
+ --color: var(--secondary-hover);
104
+ }
105
+
106
+ &:focus {
107
+ --background-color: var(--secondary-focus);
108
+ }
109
+ }
110
+
111
+ // Contrast
112
+ &.contrast {
113
+ --color: var(--contrast);
114
+
115
+ &:hover,
116
+ &:active,
117
+ &:focus {
118
+ --color: var(--contrast-hover);
119
+ }
120
+
121
+ &:focus {
122
+ --background-color: var(--contrast-focus);
123
+ }
124
+ }
125
+ }
126
+ }
127
+
128
+ // Headings
129
+ h1,
130
+ h2,
131
+ h3,
132
+ h4,
133
+ h5,
134
+ h6 {
135
+ margin-top: 0;
136
+ margin-bottom: var(--typography-spacing-vertical);
137
+ color: var(--color);
138
+ font-weight: var(--font-weight);
139
+ font-size: var(--font-size);
140
+ font-family: var(--font-family);
141
+ }
142
+
143
+ h1 {
144
+ --color: var(--h1-color);
145
+ }
146
+ h2 {
147
+ --color: var(--h2-color);
148
+ }
149
+ h3 {
150
+ --color: var(--h3-color);
151
+ }
152
+ h4 {
153
+ --color: var(--h4-color);
154
+ }
155
+ h5 {
156
+ --color: var(--h5-color);
157
+ }
158
+ h6 {
159
+ --color: var(--h6-color);
160
+ }
161
+
162
+ // Margin-top for headings after a typography block
163
+ address,
164
+ blockquote,
165
+ dl,
166
+ figure,
167
+ form,
168
+ ol,
169
+ p,
170
+ pre,
171
+ table,
172
+ ul {
173
+ & ~ h1,
174
+ & ~ h2,
175
+ & ~ h3,
176
+ & ~ h4,
177
+ & ~ h5,
178
+ & ~ h6 {
179
+ margin-top: var(--typography-spacing-vertical);
180
+ }
181
+ }
182
+
183
+ // Heading group
184
+ @if $enable-classes == false {
185
+ hgroup {
186
+ margin-bottom: var(--typography-spacing-vertical);
187
+
188
+ > * {
189
+ margin-bottom: 0;
190
+ }
191
+
192
+ > *:last-child {
193
+ --color: var(--muted-color);
194
+ --font-weight: unset;
195
+ font-size: 1rem;
196
+ font-family: unset;
197
+ }
198
+ }
199
+ }
200
+
201
+ @if $enable-classes {
202
+ hgroup,
203
+ .headings {
204
+ margin-bottom: var(--typography-spacing-vertical);
205
+
206
+ > * {
207
+ margin-bottom: 0;
208
+ }
209
+
210
+ > *:last-child {
211
+ --color: var(--muted-color);
212
+ --font-weight: unset;
213
+ font-size: 1rem;
214
+ font-family: unset;
215
+ }
216
+ }
217
+ }
218
+
219
+ // Paragraphs
220
+ p {
221
+ margin-bottom: var(--typography-spacing-vertical);
222
+ }
223
+
224
+ // Small
225
+ small {
226
+ font-size: var(--font-size);
227
+ }
228
+
229
+ // Lists
230
+ ul,
231
+ ol {
232
+ padding-right: 0;
233
+ padding-left: var(--spacing);
234
+ padding-inline-start: var(--spacing);
235
+ padding-inline-end: 0;
236
+
237
+ li {
238
+ margin-bottom: calc(var(--typography-spacing-vertical) * 0.25);
239
+ }
240
+ }
241
+
242
+ ul li {
243
+ list-style: square;
244
+ }
245
+
246
+ // Highlighted text
247
+ mark {
248
+ padding: 0.125rem 0.25rem;
249
+ background-color: var(--mark-background-color);
250
+ color: var(--mark-color);
251
+ vertical-align: baseline;
252
+ }
253
+
254
+ // Blockquote
255
+ blockquote {
256
+ display: block;
257
+ margin: var(--typography-spacing-vertical) 0;
258
+ padding: var(--spacing);
259
+ border-right: none;
260
+ border-left: 0.25rem solid var(--blockquote-border-color);
261
+ border-inline-start: 0.25rem solid var(--blockquote-border-color);
262
+ border-inline-end: none;
263
+
264
+ footer {
265
+ margin-top: calc(var(--typography-spacing-vertical) * 0.5);
266
+ color: var(--blockquote-footer-color);
267
+ }
268
+ }
269
+
270
+ // Abbreviations
271
+ // 1. Remove underline decoration in Chrome, Edge, IE, Opera, and Safari
272
+ abbr[title] {
273
+ border-bottom: 1px dotted;
274
+ text-decoration: none; // 1
275
+ cursor: help;
276
+ }
277
+
278
+ // Ins
279
+ ins {
280
+ color: var(--ins-color);
281
+ text-decoration: none;
282
+ }
283
+
284
+ // del
285
+ del {
286
+ color: var(--del-color);
287
+ }
288
+
289
+ // selection
290
+ ::selection {
291
+ background-color: var(--primary-focus);
292
+ }
@@ -0,0 +1,42 @@
1
+ @if ($enable-class-container and $enable-classes) {
2
+ /**
3
+ * Container
4
+ */
5
+
6
+ .container,
7
+ .container-fluid {
8
+ width: 100%;
9
+ margin-right: auto;
10
+ margin-left: auto;
11
+ padding-right: var(--spacing);
12
+ padding-left: var(--spacing);
13
+ }
14
+
15
+ .container {
16
+ @if map-get($breakpoints, "sm") {
17
+ @media (min-width: map-get($breakpoints, "sm")) {
18
+ max-width: map-get($viewports, "sm");
19
+ padding-right: 0;
20
+ padding-left: 0;
21
+ }
22
+ }
23
+
24
+ @if map-get($breakpoints, "md") {
25
+ @media (min-width: map-get($breakpoints, "md")) {
26
+ max-width: map-get($viewports, "md");
27
+ }
28
+ }
29
+
30
+ @if map-get($breakpoints, "lg") {
31
+ @media (min-width: map-get($breakpoints, "lg")) {
32
+ max-width: map-get($viewports, "lg");
33
+ }
34
+ }
35
+
36
+ @if map-get($breakpoints, "xl") {
37
+ @media (min-width: map-get($breakpoints, "xl")) {
38
+ max-width: map-get($viewports, "xl");
39
+ }
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Document
3
+ * Content-box & Responsive typography
4
+ */
5
+
6
+ // Reboot 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
+ // Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`
12
+ *,
13
+ *::before,
14
+ *::after {
15
+ box-sizing: border-box; // 1
16
+ }
17
+
18
+ // 1. Add text decoration inheritance in all browsers (opinionated)
19
+ // 2. Add vertical alignment inheritance in all browsers (opinionated)
20
+ ::before,
21
+ ::after {
22
+ text-decoration: inherit; // 1
23
+ vertical-align: inherit; // 2
24
+ }
25
+
26
+ // 1. Correct the line height in all browsers
27
+ // 2. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS
28
+ // 3. Change the default tap highlight to be completely transparent in iOS
29
+ // 4. Use the default cursor in all browsers (opinionated)
30
+ // 5. Use a 4-space tab width in all browsers (opinionated)
31
+ // 6. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS
32
+ html {
33
+ -webkit-text-size-adjust: 100%; // 2
34
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // 3
35
+ -ms-text-size-adjust: 100%; // 6
36
+ text-rendering: optimizeLegibility;
37
+ background-color: var(--background-color);
38
+ color: var(--color);
39
+ font-weight: var(--font-weight);
40
+ font-size: var(--font-size);
41
+ line-height: var(--line-height); // 1
42
+ font-family: var(--font-family);
43
+ cursor: default; // 4
44
+ tab-size: 4; // 5
45
+ }
@@ -0,0 +1,24 @@
1
+ @if ($enable-classes and $enable-grid) {
2
+ /**
3
+ * Grid
4
+ * Minimal grid system with auto-layout columns
5
+ */
6
+
7
+ .grid {
8
+ grid-column-gap: var(--grid-spacing-horizontal);
9
+ grid-row-gap: var(--grid-spacing-vertical);
10
+ display: grid;
11
+ grid-template-columns: 1fr;
12
+ margin: 0;
13
+
14
+ @if map-get($breakpoints, "lg") {
15
+ @media (min-width: map-get($breakpoints, "lg")) {
16
+ grid-template-columns: repeat(auto-fit, minmax(0%, 1fr));
17
+ }
18
+ }
19
+
20
+ & > * {
21
+ min-width: 0; // HACK for childs in overflow
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Horizontal scroller (<figure>)
3
+ */
4
+
5
+ // Wrapper to make any content responsive across all viewports
6
+ figure {
7
+ display: block;
8
+ margin: 0;
9
+ padding: 0;
10
+ overflow-x: auto;
11
+
12
+ figcaption {
13
+ padding: calc(var(--spacing) * 0.5) 0;
14
+ color: var(--muted-color);
15
+ }
16
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Section
3
+ * Responsive spacings for section
4
+ */
5
+
6
+ section {
7
+ margin-bottom: var(--block-spacing-vertical);
8
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Sectioning
3
+ * Container and responsive spacings for header, main, footer
4
+ */
5
+
6
+ // Reboot 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
+ // Render the `main` element consistently in IE
12
+ main {
13
+ display: block;
14
+ }
15
+
16
+ // Pico
17
+ // ––––––––––––––––––––
18
+
19
+ body {
20
+ width: 100%;
21
+ margin: 0;
22
+
23
+ > header,
24
+ > main,
25
+ > footer {
26
+ width: 100%;
27
+ margin-right: auto;
28
+ margin-left: auto;
29
+
30
+ // Semantic container
31
+ @if $enable-semantic-container {
32
+ padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);
33
+
34
+ // Centered viewport
35
+ @if $enable-viewport {
36
+ @if map-get($breakpoints, "sm") and $enable-viewport {
37
+ @media (min-width: map-get($breakpoints, "sm")) {
38
+ max-width: map-get($viewports, "sm");
39
+ padding-right: 0;
40
+ padding-left: 0;
41
+ }
42
+ }
43
+
44
+ @if map-get($breakpoints, "md") and $enable-viewport {
45
+ @media (min-width: map-get($breakpoints, "md")) {
46
+ max-width: map-get($viewports, "md");
47
+ }
48
+ }
49
+
50
+ @if map-get($breakpoints, "lg") and $enable-viewport {
51
+ @media (min-width: map-get($breakpoints, "lg")) {
52
+ max-width: map-get($viewports, "lg");
53
+ }
54
+ }
55
+
56
+ @if map-get($breakpoints, "xl") and $enable-viewport {
57
+ @media (min-width: map-get($breakpoints, "xl")) {
58
+ max-width: map-get($viewports, "xl");
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ // Semantic container
65
+ @else {
66
+ padding: var(--block-spacing-vertical) 0;
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,65 @@
1
+ // Navy-Grey
2
+ $grey-hue: 205 !default;
3
+ $grey-50: hsl($grey-hue, 20%, 94%) !default;
4
+ $grey-100: hsl($grey-hue, 18%, 86%) !default;
5
+ $grey-200: hsl($grey-hue, 16%, 77%) !default;
6
+ $grey-300: hsl($grey-hue, 14%, 68%) !default;
7
+ $grey-400: hsl($grey-hue, 12%, 59%) !default;
8
+ $grey-500: hsl($grey-hue, 10%, 50%) !default;
9
+ $grey-600: hsl($grey-hue, 15%, 41%) !default;
10
+ $grey-700: hsl($grey-hue, 20%, 32%) !default;
11
+ $grey-800: hsl($grey-hue, 25%, 23%) !default;
12
+ $grey-900: hsl($grey-hue, 30%, 15%) !default;
13
+
14
+ // Light Blue
15
+ $primary-hue: 195 !default;
16
+ $primary-50: hsl($primary-hue, 90%, 94%) !default;
17
+ $primary-100: hsl($primary-hue, 88%, 86%) !default;
18
+ $primary-200: hsl($primary-hue, 86%, 77%) !default;
19
+ $primary-300: hsl($primary-hue, 84%, 68%) !default;
20
+ $primary-400: hsl($primary-hue, 82%, 59%) !default;
21
+ $primary-500: hsl($primary-hue, 80%, 50%) !default;
22
+ $primary-600: hsl($primary-hue, 85%, 41%) !default;
23
+ $primary-700: hsl($primary-hue, 90%, 32%) !default;
24
+ $primary-800: hsl($primary-hue, 95%, 23%) !default;
25
+ $primary-900: hsl($primary-hue, 100%, 15%) !default;
26
+
27
+ // Black & White
28
+ $black: #000 !default;
29
+ $white: #fff !default;
30
+
31
+ // Amber
32
+ $amber-50: #fff8e1 !default;
33
+ $amber-100: #ffecb3 !default;
34
+ $amber-200: #ffe082 !default;
35
+ $amber-300: #ffd54f !default;
36
+ $amber-400: #ffca28 !default;
37
+ $amber-500: #ffc107 !default;
38
+ $amber-600: #ffb300 !default;
39
+ $amber-700: #ffa000 !default;
40
+ $amber-800: #ff8f00 !default;
41
+ $amber-900: #ff6f00 !default;
42
+
43
+ // Green
44
+ $green-50: #e8f5e9 !default;
45
+ $green-100: #c8e6c9 !default;
46
+ $green-200: #a5d6a7 !default;
47
+ $green-300: #81c784 !default;
48
+ $green-400: #66bb6a !default;
49
+ $green-500: #4caf50 !default;
50
+ $green-600: #43a047 !default;
51
+ $green-700: #388e3c !default;
52
+ $green-800: #2e7d32 !default;
53
+ $green-900: #1b5e20 !default;
54
+
55
+ // Red
56
+ $red-50: #ffebee !default;
57
+ $red-100: #ffcdd2 !default;
58
+ $red-200: #ef9a9a !default;
59
+ $red-300: #e57373 !default;
60
+ $red-400: #ef5350 !default;
61
+ $red-500: #f44336 !default;
62
+ $red-600: #e53935 !default;
63
+ $red-700: #d32f2f !default;
64
+ $red-800: #c62828 !default;
65
+ $red-900: #b71c1c !default;