pallote-css 0.3.11 → 0.3.12

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 (54) hide show
  1. package/README.md +0 -144
  2. package/dist/pallote.scss +31 -0
  3. package/dist/styles/common/_editor.scss +181 -0
  4. package/dist/styles/common/_fontface.scss +31 -0
  5. package/dist/styles/common/_functions.scss +11 -0
  6. package/dist/styles/common/_global.scss +157 -0
  7. package/dist/styles/common/_mixins.scss +165 -0
  8. package/dist/styles/common/_reset.scss +145 -0
  9. package/dist/styles/common/_variables.scss +252 -0
  10. package/dist/styles/components/_accordion.scss +133 -0
  11. package/dist/styles/components/_alert.scss +198 -0
  12. package/dist/styles/components/_breadcrumbs.scss +50 -0
  13. package/dist/styles/components/_button.scss +180 -0
  14. package/dist/styles/components/_buttons.scss +52 -0
  15. package/dist/styles/components/_card.scss +268 -0
  16. package/dist/styles/components/_divider.scss +52 -0
  17. package/dist/styles/components/_form.scss +58 -0
  18. package/dist/styles/components/_grid.scss +190 -0
  19. package/dist/styles/components/_input.scss +298 -0
  20. package/dist/styles/components/_link.scss +46 -0
  21. package/dist/styles/components/_list.scss +60 -0
  22. package/dist/styles/components/_nav.scss +274 -0
  23. package/dist/styles/components/_navbar.scss +192 -0
  24. package/dist/styles/components/_page.scss +33 -0
  25. package/dist/styles/components/_section.scss +193 -0
  26. package/dist/styles/components/_sidebar.scss +61 -0
  27. package/dist/styles/components/_snippet.scss +85 -0
  28. package/dist/styles/components/_status.scss +60 -0
  29. package/dist/styles/components/_switch.scss +84 -0
  30. package/dist/styles/components/_tabs.scss +118 -0
  31. package/dist/styles/components/_tag.scss +79 -0
  32. package/dist/styles/modules/_cookie.scss +38 -0
  33. package/dist/styles/utilities/_color.scss +119 -0
  34. package/dist/styles/utilities/_global.scss +211 -0
  35. package/dist/styles/utilities/_text.scss +207 -0
  36. package/package.json +8 -6
  37. package/dist/assets/fonts/SourceSansPro/regular.woff2 +0 -0
  38. package/dist/assets/fonts/SourceSansPro/regularitalic.woff2 +0 -0
  39. package/dist/assets/fonts/SourceSansPro/semibold.woff2 +0 -0
  40. package/dist/assets/fonts/SourceSansPro/semibolditalic.woff2 +0 -0
  41. package/dist/assets/icons/logos/patreon.svg +0 -3
  42. package/dist/assets/icons/phosphor/arrow-right.svg +0 -1
  43. package/dist/assets/icons/phosphor/arrow-square-out.svg +0 -1
  44. package/dist/assets/icons/phosphor/caret-down.svg +0 -1
  45. package/dist/assets/icons/phosphor/check-circle.svg +0 -1
  46. package/dist/assets/icons/phosphor/check.svg +0 -1
  47. package/dist/assets/icons/phosphor/coffee.svg +0 -1
  48. package/dist/assets/icons/phosphor/download-simple.svg +0 -1
  49. package/dist/assets/icons/phosphor/envelope-simple.svg +0 -1
  50. package/dist/assets/icons/phosphor/files.svg +0 -1
  51. package/dist/assets/icons/phosphor/info.svg +0 -1
  52. package/dist/assets/icons/phosphor/warning.svg +0 -1
  53. package/dist/assets/icons/phosphor/x-circle.svg +0 -1
  54. package/dist/assets/icons/rabbit.svg +0 -1
@@ -0,0 +1,268 @@
1
+ @use "../common/variables";
2
+ @use "../utilities/text";
3
+
4
+ // —————————————————————————————————————————————————————————————————
5
+ // elements
6
+ // size
7
+ // direction
8
+ // align
9
+ // transparent
10
+ // hasShadow
11
+ // —————————————————————————————————————————————————————————————————
12
+
13
+ // —————————————————————————————————————————————————————————————————
14
+ // elements
15
+ // —————————————————————————————————————————————————————————————————
16
+
17
+ .card {
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: stretch;
21
+ width: 100%;
22
+ overflow: hidden; // hide corners when CardMedia has fullWidth prop set to true
23
+ border: variables.$border;
24
+
25
+ &:not(.card--transparent) {
26
+ background-color: variables.$background-paper;
27
+ }
28
+
29
+ &__media {
30
+ flex-basis: 0;
31
+
32
+ &Inner {
33
+ background-size: cover;
34
+ background-repeat: no-repeat;
35
+ background-position: center center;
36
+ width: 100%;
37
+ height: 100%;
38
+ background-color: variables.$overlay;
39
+ overflow: hidden;
40
+ padding-bottom: 50%;
41
+
42
+ .card--transparent & {
43
+ background-color: variables.$overlay-contrast;
44
+ }
45
+ }
46
+ }
47
+
48
+ &__label,
49
+ &__title {
50
+ @extend %text-bold;
51
+ }
52
+
53
+ &__title {
54
+ line-height: 1.25;
55
+ }
56
+
57
+ &__subtitle {
58
+ @extend %text-regular;
59
+ }
60
+
61
+ &__content {
62
+ display: inline-flex;
63
+ flex-direction: column;
64
+ align-items: flex-start;
65
+
66
+ &--fullWidth {
67
+
68
+ .card > &.card__content {
69
+ padding-right: 0;
70
+ padding-left: 0;
71
+ }
72
+ }
73
+ }
74
+
75
+ &__actions {
76
+ display: flex;
77
+ justify-content: space-between;
78
+
79
+ >*:only-child {
80
+ margin-left: auto;
81
+ }
82
+
83
+ &--portrait {
84
+ flex-direction: column;
85
+
86
+ >*:not(:last-child) {
87
+ margin-bottom: variables.$spacing-md;
88
+ }
89
+ }
90
+ }
91
+ }
92
+
93
+ // —————————————————————————————————————————————————————————————————
94
+ // size
95
+ // —————————————————————————————————————————————————————————————————
96
+
97
+ @mixin size($value, $size) {
98
+
99
+ &:not(.card--transparent) {
100
+ border-radius: $size;
101
+ }
102
+
103
+ &.card--hasShadow {
104
+ box-shadow: 0 0 $size $size*0.25 rgba(variables.$main ,0.3);
105
+ }
106
+
107
+ > .card__media,
108
+ > .card__header,
109
+ > .card__content,
110
+ > .card__actions {
111
+ padding: $size;
112
+
113
+ &:not(:first-child) {
114
+ padding-top: 0;
115
+ }
116
+ }
117
+
118
+ > .card__actions {
119
+ margin-top: auto;
120
+ }
121
+
122
+ &.card--transparent {
123
+
124
+ > .card__media,
125
+ > .card__header,
126
+ > .card__content,
127
+ > .card__actions {
128
+ padding: 0;
129
+
130
+ &:not(:first-child) {
131
+ padding-top: $size;
132
+ }
133
+ }
134
+
135
+ > .card__media .card__mediaInner {
136
+ border-radius: calc($size/2);
137
+ }
138
+ }
139
+
140
+ .card__media--fullWidth {
141
+ padding-right: 0;
142
+ padding-top: 0;
143
+ padding-left: 0;
144
+ }
145
+
146
+ .card {
147
+
148
+ &__label {
149
+ @if $value == xs { @extend %overline; }
150
+ @else if $value == sm { @extend %overline; }
151
+ @else if $value == md { @extend %overline; }
152
+ @else if $value == lg { @extend %caption; }
153
+ @else if $value == xl { @extend %body; }
154
+ }
155
+
156
+ &__title {
157
+ @if $value == xs { @extend %body; }
158
+ @else if $value == sm { @extend %subtitle; }
159
+ @else if $value == md { @extend %h6; }
160
+ @else if $value == lg { @extend %h5; }
161
+ @else if $value == xl { @extend %h4; }
162
+ }
163
+
164
+ &__subtitle {
165
+ @if $value == xs { @extend %caption; }
166
+ @else if $value == sm { @extend %body; }
167
+ @else if $value == md { @extend %subtitle; }
168
+ @else if $value == lg { @extend %h6; }
169
+ @else if $value == xl { @extend %h5; }
170
+ margin-top: calc($size / 3);
171
+ }
172
+
173
+ &__mediaInner {
174
+ border-radius: $size*0.25;
175
+ }
176
+ }
177
+
178
+ > .card__media--fullWidth .card__mediaInner {
179
+ border-radius: 0;
180
+ }
181
+
182
+ &.card--transparent > .card__media--fullWidth .card__mediaInner {
183
+ border-radius: $size*0.5;
184
+ }
185
+
186
+ &.card--landscape {
187
+
188
+ > .card__media,
189
+ > .card__header,
190
+ > .card__content,
191
+ > .card__actions {
192
+ padding-top: $size;
193
+
194
+ &:not(:first-child) {
195
+ padding-left: 0;
196
+ }
197
+ }
198
+
199
+ > .card__actions {
200
+ margin-left: auto;
201
+ flex-direction: column;
202
+ justify-content: flex-start;
203
+ }
204
+
205
+ &.card--transparent {
206
+
207
+ > .card__media,
208
+ > .card__header,
209
+ > .card__content,
210
+ > .card__actions {
211
+ padding: 0;
212
+
213
+ &:not(:first-child) {
214
+ padding-left: $size;
215
+ }
216
+ }
217
+
218
+ > .card__media .card__mediaInner {
219
+ border-radius: calc($size/2);
220
+ }
221
+ }
222
+
223
+ .card__media--fullWidth {
224
+ padding-top: 0;
225
+ padding-bottom: 0;
226
+ padding-left: 0;
227
+ }
228
+ }
229
+ }
230
+
231
+ .card {
232
+ @include size(md, variables.$spacing-md+variables.$spacing-sm);
233
+ &--xs.card { @include size(xs, variables.$spacing-sm+variables.$spacing-xs); }
234
+ &--sm.card { @include size(sm, variables.$spacing-md); }
235
+ &--lg.card { @include size(lg, variables.$spacing-lg); }
236
+ &--xl.card { @include size(xl, variables.$spacing-lg+variables.$spacing-sm); }
237
+ }
238
+
239
+ // —————————————————————————————————————————————————————————————————
240
+ // direction
241
+ // —————————————————————————————————————————————————————————————————
242
+
243
+ // most of the direction styling is handled by the size mixin
244
+
245
+ .card--landscape {
246
+ flex-direction: row;
247
+ }
248
+
249
+ // —————————————————————————————————————————————————————————————————
250
+ // align
251
+ // —————————————————————————————————————————————————————————————————
252
+
253
+ .card {
254
+
255
+ &--center { text-align: center; }
256
+ &--right { text-align: right; }
257
+ }
258
+ // —————————————————————————————————————————————————————————————————
259
+ // transparent
260
+ // —————————————————————————————————————————————————————————————————
261
+
262
+ // the transparent styling is handled by the size mixin
263
+
264
+ // —————————————————————————————————————————————————————————————————
265
+ // hasShadow
266
+ // —————————————————————————————————————————————————————————————————
267
+
268
+ // the shadow styling is handled by the size mixin
@@ -0,0 +1,52 @@
1
+ @use "../common/variables";
2
+
3
+ // —————————————————————————————————————————————————————————————————
4
+ // elements
5
+ // direction
6
+ // size
7
+ // —————————————————————————————————————————————————————————————————
8
+
9
+ // —————————————————————————————————————————————————————————————————
10
+ // elements
11
+ // —————————————————————————————————————————————————————————————————
12
+
13
+ .divider {
14
+ display: inline-block;
15
+ background-color: variables.$border-color;
16
+ height: 1px;
17
+ width: 100%;
18
+ }
19
+
20
+ // —————————————————————————————————————————————————————————————————
21
+ // direction
22
+ // —————————————————————————————————————————————————————————————————
23
+
24
+ .divider {
25
+
26
+ &-portrait {
27
+ height: 100%;
28
+ width: 1px;
29
+ }
30
+ }
31
+
32
+ // —————————————————————————————————————————————————————————————————
33
+ // size
34
+ // —————————————————————————————————————————————————————————————————
35
+
36
+ @mixin size($size) {
37
+ margin-top: $size;
38
+ margin-bottom: $size;
39
+
40
+ &.divider-portrait {
41
+ margin-top: 0;
42
+ margin-right: $size;
43
+ margin-bottom: 0;
44
+ margin-left: $size;
45
+ }
46
+ }
47
+
48
+ .divider {
49
+ @include size(1rem);
50
+ &-sm { @include size(.5rem); }
51
+ &-lg { @include size(2rem); }
52
+ }
@@ -0,0 +1,58 @@
1
+ @use "../common/variables";
2
+ @use "../utilities/text";
3
+
4
+ // —————————————————————————————————————————————————————————————————
5
+ // elements
6
+ // dense
7
+ // card
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ // —————————————————————————————————————————————————————————————————
11
+ // elements
12
+ // —————————————————————————————————————————————————————————————————
13
+
14
+ .form {
15
+ width: 100%;
16
+
17
+ &_title,
18
+ &_content,
19
+ &_actions {
20
+
21
+ &:not(:last-child) {
22
+ margin-bottom: 1.5rem;
23
+ }
24
+ }
25
+
26
+ &_title {
27
+ @extend %subtitle;
28
+ font-weight: variables.$font-bold;
29
+ }
30
+ }
31
+
32
+ // —————————————————————————————————————————————————————————————————
33
+ // dense
34
+ // —————————————————————————————————————————————————————————————————
35
+
36
+ .form-dense {
37
+
38
+ .form {
39
+
40
+ &_title,
41
+ &_content,
42
+ &_actions {
43
+
44
+ &:not(:last-child) {
45
+ margin-bottom: 1rem;
46
+ }
47
+ }
48
+ }
49
+
50
+ .input:not(:last-child) {
51
+ margin-bottom: .5rem;
52
+ }
53
+
54
+ &.form-card {
55
+ padding: 1rem;
56
+ border-radius: 1rem;
57
+ }
58
+ }
@@ -0,0 +1,190 @@
1
+ @use "../common/mixins";
2
+ @use "../common/variables";
3
+
4
+ // —————————————————————————————————————————————————————————————————
5
+ // variables
6
+ // elements
7
+ // wrap
8
+ // direction
9
+ // justifyContent
10
+ // alignItems
11
+ // alignSelf
12
+ // flexGrow
13
+ // spacing
14
+ // width
15
+ // —————————————————————————————————————————————————————————————————
16
+
17
+ // —————————————————————————————————————————————————————————————————
18
+ // variables
19
+ // —————————————————————————————————————————————————————————————————
20
+
21
+ variables.$col: calc(100% / 12);
22
+
23
+ // —————————————————————————————————————————————————————————————————
24
+ // elements
25
+ // —————————————————————————————————————————————————————————————————
26
+
27
+ .grid {
28
+ display: flex;
29
+ box-sizing: border-box;
30
+ flex-direction: row;
31
+ flex-wrap: wrap;
32
+
33
+ &__item:not(.grid) {
34
+ position: relative;
35
+ display: flex;
36
+ flex-direction: column;
37
+ float: left;
38
+ }
39
+ }
40
+
41
+ // —————————————————————————————————————————————————————————————————
42
+ // wrap
43
+ // —————————————————————————————————————————————————————————————————
44
+
45
+ .grid {
46
+
47
+ // have children wrap automatically
48
+ &--wrap {
49
+ justify-content: center;
50
+
51
+ > .grid__item {
52
+ flex: 1 0 0;
53
+ }
54
+ }
55
+ }
56
+
57
+ // —————————————————————————————————————————————————————————————————
58
+ // direction
59
+ // —————————————————————————————————————————————————————————————————
60
+
61
+ .grid--column { flex-direction: column; }
62
+ .grid--columnReverse { flex-direction: column-reverse; }
63
+ .grid--row { flex-direction: row; flex-wrap: wrap; }
64
+ .grid--rowReverse { flex-direction: row-reverse; flex-wrap: wrap; }
65
+
66
+ // —————————————————————————————————————————————————————————————————
67
+ // justifyContent
68
+ // —————————————————————————————————————————————————————————————————
69
+
70
+ .grid--jc-center { justify-content: center;}
71
+ .grid--jc-end { justify-content: flex-end;}
72
+ .grid--jc-start { justify-content: flex-start;}
73
+ .grid--jc-spaceAround { justify-content: space-around;}
74
+ .grid--jc-spaceBetween { justify-content: space-between;}
75
+ .grid--jc-spaceEvenly { justify-content: space-evenly;}
76
+
77
+ // —————————————————————————————————————————————————————————————————
78
+ // alignItems
79
+ // —————————————————————————————————————————————————————————————————
80
+
81
+ .grid--ai-stretch { align-items: stretch; }
82
+ .grid--ai-center { align-items: center; }
83
+ .grid--ai-end { align-items: flex-end; }
84
+ .grid--ai-start { align-items: flex-start; }
85
+ .grid--ai-baseline { align-items: baseline; }
86
+
87
+ // —————————————————————————————————————————————————————————————————
88
+ // alignSelf
89
+ // —————————————————————————————————————————————————————————————————
90
+
91
+ .grid--as-stretch { align-self: stretch; }
92
+ .grid--as-center { align-self: center; }
93
+ .grid--as-end { align-self: flex-end; }
94
+ .grid--as-start { align-self: flex-start; }
95
+ .grid--as-baseline { align-self: baseline; }
96
+
97
+
98
+ // —————————————————————————————————————————————————————————————————
99
+ // flexGrow
100
+ // —————————————————————————————————————————————————————————————————
101
+
102
+ .grid--fg {
103
+
104
+ &-0 { flex-grow: 0; }
105
+ &-1 { flex-grow: 1; }
106
+ &-auto { flex-grow: auto; }
107
+ }
108
+
109
+ // —————————————————————————————————————————————————————————————————
110
+ // spacing
111
+ // —————————————————————————————————————————————————————————————————
112
+
113
+ @for $spacingWidth from 1 through 12 {
114
+
115
+ .grid--spacing#{$spacingWidth} {
116
+ margin: -($spacingWidth * 0.5rem)*0.5;
117
+ width: calc(100% + #{$spacingWidth * 0.5rem});
118
+
119
+ > .grid__item {
120
+ padding: ($spacingWidth * 0.5rem)*0.5;
121
+ }
122
+
123
+ &.grid__item {
124
+ width: calc(100% + #{$spacingWidth * 0.5rem});
125
+ }
126
+ }
127
+ }
128
+
129
+ // —————————————————————————————————————————————————————————————————
130
+ // width
131
+ // —————————————————————————————————————————————————————————————————
132
+
133
+ @for $colWidth from 1 through 12 {
134
+
135
+ .grid--#{$colWidth} {
136
+ width: $colWidth*variables.$col;
137
+
138
+ &.grid {
139
+ width: $colWidth*variables.$col;
140
+ }
141
+
142
+ @for $spacingWidth from 1 through 12 {
143
+
144
+ &.grid--spacing#{$spacingWidth} {
145
+ width: calc(#{$colWidth*variables.$col} + #{$spacingWidth * 0.5rem});
146
+ }
147
+ }
148
+ }
149
+ }
150
+
151
+ @mixin break-width($breakpoint) {
152
+
153
+ @include mixins.responsive(up, $breakpoint) {
154
+
155
+ @for $colWidth from 1 through 12 {
156
+
157
+ &#{$colWidth} {
158
+ width: $colWidth*variables.$col;
159
+
160
+ &.grid {
161
+ width: $colWidth*variables.$col;
162
+ }
163
+
164
+ @for $spacingWidth from 1 through 12 {
165
+
166
+ &.grid--spacing#{$spacingWidth} {
167
+ width: calc(#{$colWidth*variables.$col} + #{$spacingWidth * 0.5rem});
168
+ }
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
174
+
175
+ [class*="grid--xs"],
176
+ [class*="grid--sm"],
177
+ [class*="grid--md"],
178
+ [class*="grid--lg"],
179
+ [class*="grid--xl"] {
180
+ width: 100%;
181
+ }
182
+
183
+ .grid {
184
+
185
+ &--xs { @include break-width(mobile-sm); }
186
+ &--sm { @include break-width(mobile); }
187
+ &--md { @include break-width(tablet); }
188
+ &--lg { @include break-width(laptop); }
189
+ &--xl { @include break-width(desktop); }
190
+ }