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,198 @@
1
+ @use "../common/mixins";
2
+ @use "../common/variables";
3
+ @use "../utilities/text";
4
+
5
+ // —————————————————————————————————————————————————————————————————
6
+ // elements
7
+ // color
8
+ // notice
9
+ // bar
10
+ // dense
11
+ // noIcon
12
+ // —————————————————————————————————————————————————————————————————
13
+
14
+ $spacing-alert: variables.$spacing-sm;
15
+
16
+ // —————————————————————————————————————————————————————————————————
17
+ // elements
18
+ // —————————————————————————————————————————————————————————————————
19
+
20
+ .alert {
21
+ border-radius: variables.$spacing-sm;
22
+ background-color: variables.$info-light;
23
+ color: variables.$text;
24
+ padding: $spacing-alert $spacing-alert*2;
25
+ position: fixed;
26
+ top: variables.$spacing-md;
27
+ right: variables.$spacing-md;
28
+ width: fit-content;
29
+ max-width: variables.$spacing-xxl*3;
30
+ z-index: 20;
31
+
32
+ &:not(.alert--bar) {
33
+ padding-left: variables.$spacing-lg + variables.$spacing-sm;
34
+ }
35
+
36
+ @include mixins.responsive(down, mobile) {
37
+ @include mixins.calc(max-width, '100vw - 'variables.$spacing-md);
38
+ right: 8px;
39
+ top: variables.$spacing-sm;
40
+ }
41
+
42
+ @include mixins.responsive(down, mobile-sm) {
43
+ @include mixins.calc(width, '100vw - 'variables.$spacing-md);
44
+ }
45
+
46
+ &:before {
47
+ content: "";
48
+ position: absolute;
49
+ top: $spacing-alert;
50
+ left: variables.$spacing-sm;
51
+ height: variables.$spacing-md*1.5;
52
+ width: variables.$spacing-md*1.5;
53
+ background-size: cover;
54
+ background-repeat: no-repeat;
55
+ }
56
+
57
+ &__title {
58
+ font-weight: variables.$font-bold !important;
59
+ }
60
+
61
+ &__subtitle {
62
+ @extend .caption;
63
+ padding-bottom: 0.2em;
64
+ }
65
+
66
+ &__close {
67
+ transition: opacity variables.$transition-md;
68
+ position: absolute;
69
+ top: variables.$spacing-sm;
70
+ right: variables.$spacing-sm;
71
+ line-height: 0;
72
+
73
+ svg {
74
+ width: variables.$spacing-sm;
75
+ height: variables.$spacing-sm;
76
+ fill: variables.$success-dark
77
+ }
78
+
79
+ &:hover {
80
+ opacity: 0.5;
81
+ }
82
+ }
83
+ }
84
+
85
+ // —————————————————————————————————————————————————————————————————
86
+ // color
87
+ // —————————————————————————————————————————————————————————————————
88
+
89
+ @mixin color($color, $background-color: variables.$info-light, $border-color: variables.$info) {
90
+ @if $color == success { $background-color: variables.$success-light; $border-color: variables.$success; }
91
+ @else if $color == info { $background-color: variables.$info-light; $border-color: variables.$info; }
92
+ @else if $color == warning { $background-color: variables.$warning-light; $border-color: variables.$warning; }
93
+ @else if $color == error { $background-color: variables.$error-light; $border-color: variables.$error; }
94
+
95
+ background-color: $background-color;
96
+ border: 1px solid $border-color;
97
+ color: variables.$text;
98
+
99
+ // &:not(.alert--bar):before {
100
+
101
+ // @if $color == success { content: url(variables.$icons-path + 'phosphor/check-circle.svg'); }
102
+ // @else if $color == info { content: url(variables.$icons-path + 'phosphor/info.svg'); }
103
+ // @else if $color == warning { content: url(variables.$icons-path + 'phosphor/warning.svg'); }
104
+ // @else if $color == error { content: url(variables.$icons-path + 'phosphor/x-circle.svg'); }
105
+ // }
106
+ }
107
+
108
+ .alert {
109
+
110
+ &--success { @include color(success); }
111
+ &--info { @include color(info); }
112
+ &--warning { @include color(warning); }
113
+ &--error { @include color(error); }
114
+ }
115
+
116
+ // —————————————————————————————————————————————————————————————————
117
+ // notice
118
+ // —————————————————————————————————————————————————————————————————
119
+
120
+ .alert {
121
+
122
+ &--notice {
123
+ position: relative;
124
+ max-width: none;
125
+ z-index: 1;
126
+ top: 0;
127
+ right: 0;
128
+ }
129
+ }
130
+
131
+ // —————————————————————————————————————————————————————————————————
132
+ // bar
133
+ // —————————————————————————————————————————————————————————————————
134
+
135
+ .alert {
136
+
137
+ &--bar {
138
+ position: fixed;
139
+ top: 0;
140
+ right: 0;
141
+ max-width: none;
142
+ width: 100%; // needed for small devices to not overflow the container
143
+ z-index: 1;
144
+ border-radius: 0;
145
+ border-left: 0;
146
+ border-right: 0;
147
+ text-align: center;
148
+ }
149
+ }
150
+
151
+ // —————————————————————————————————————————————————————————————————
152
+ // dense
153
+ // —————————————————————————————————————————————————————————————————
154
+
155
+ .alert--dense {
156
+ padding: $spacing-alert*0.5 $spacing-alert;
157
+
158
+ &:before {
159
+ top: $spacing-alert*0.5;
160
+ left: $spacing-alert*0.5;
161
+ height: variables.$spacing-md*1.25;
162
+ width: variables.$spacing-md*1.25;
163
+ }
164
+
165
+ &:not(.alert--bar) {
166
+ padding-left: variables.$spacing-md*1.75;
167
+ }
168
+
169
+ .alert__title {
170
+
171
+ + .alert__title,
172
+ + .alert__subtitle {
173
+ margin-top: 0;
174
+ }
175
+ }
176
+
177
+ .alert__title { @extend .caption; }
178
+ .alert__subtitle { @extend .overline; }
179
+ }
180
+
181
+ // —————————————————————————————————————————————————————————————————
182
+ // noIcon
183
+ // —————————————————————————————————————————————————————————————————
184
+
185
+ .alert.alert {
186
+
187
+ &--noIcon {
188
+ padding-left: variables.$spacing-md;
189
+
190
+ &.alert--dense {
191
+ padding-left: variables.$spacing-sm;
192
+ }
193
+
194
+ &:before {
195
+ display: none;
196
+ }
197
+ }
198
+ }
@@ -0,0 +1,50 @@
1
+ @use "../common/mixins";
2
+ @use "../common/variables";
3
+
4
+ // —————————————————————————————————————————————————————————————————
5
+ // elements
6
+ // separator
7
+ // —————————————————————————————————————————————————————————————————
8
+
9
+ // —————————————————————————————————————————————————————————————————
10
+ // elements
11
+ // —————————————————————————————————————————————————————————————————
12
+
13
+ .breadcrumbs {
14
+ display: inline-flex;
15
+ align-items: baseline;
16
+
17
+ @include mixins.responsive(down, tablet) {
18
+ flex-direction: column;
19
+ }
20
+
21
+ &__item {
22
+ cursor: pointer;
23
+
24
+ &:not(:first-child) {
25
+ margin-left: variables.$spacing-xs;
26
+
27
+ &:before {
28
+ content: "/";
29
+ margin-right: variables.$spacing-xs;
30
+ color: variables.$text-alt;
31
+ display: inline-block; // required to remove underline on hover for before element
32
+ }
33
+ }
34
+
35
+ @include mixins.hover {
36
+ text-decoration: underline;
37
+ }
38
+ }
39
+ }
40
+
41
+ // —————————————————————————————————————————————————————————————————
42
+ // separator
43
+ // —————————————————————————————————————————————————————————————————
44
+
45
+ .breadcrumbs--arrow .breadcrumbs__item:not(:first-child):before {
46
+ content: "\2039";
47
+ transform: rotate(180deg);
48
+ font-size: 1.5em;
49
+ float: left;
50
+ }
@@ -0,0 +1,180 @@
1
+ @use "sass:color";
2
+ @use "sass:list";
3
+ @use "../common/mixins";
4
+ @use "../common/variables";
5
+ @use "../utilities/text";
6
+
7
+ // —————————————————————————————————————————————————————————————————
8
+ // elements
9
+ // kind
10
+ // variant
11
+ // size
12
+ // color
13
+ // fullWidth
14
+ // disabled
15
+ // —————————————————————————————————————————————————————————————————
16
+
17
+ // —————————————————————————————————————————————————————————————————
18
+ // elements
19
+ // —————————————————————————————————————————————————————————————————
20
+
21
+ .button {
22
+ cursor: pointer;
23
+ overflow: hidden;
24
+ display: inline-flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ border-radius: variables.$border-radius-md;
28
+ position: relative;
29
+ line-height: 0;
30
+ text-transform: uppercase;
31
+ font-weight: variables.$font-bold;
32
+ white-space: nowrap;
33
+ outline-offset: 2px;
34
+ width: fit-content;
35
+ min-width: fit-content;
36
+
37
+ svg {
38
+ stroke: currentColor;
39
+ fill: currentColor;
40
+ }
41
+ }
42
+
43
+ // —————————————————————————————————————————————————————————————————
44
+ // kind
45
+ // —————————————————————————————————————————————————————————————————
46
+
47
+ // This property is handled by the size mixin
48
+
49
+ // —————————————————————————————————————————————————————————————————
50
+ // variant
51
+ // —————————————————————————————————————————————————————————————————
52
+
53
+ // This property is handled by the color mixin
54
+
55
+ // —————————————————————————————————————————————————————————————————
56
+ // size
57
+ // —————————————————————————————————————————————————————————————————
58
+
59
+ @mixin size($value, $size) {
60
+ height: $size;
61
+ gap: $size*.25;
62
+ padding-right: $size*.33;
63
+ padding-left: $size*.33;
64
+
65
+ @if $value == xs or $value == sm {
66
+ @extend %overline;
67
+ border-radius: variables.$border-radius-sm;
68
+ }
69
+ @if $value == md { @extend %body; }
70
+ @if $value == lg { @extend %subtitle; }
71
+
72
+ svg {
73
+ width: calc($size/1.75);
74
+ height: calc($size/1.75);
75
+ margin-right: -$size*.05;
76
+ margin-left: -$size*.05;
77
+ }
78
+
79
+ &:not(.button-icon) {
80
+
81
+ svg {
82
+ margin-top: 0.15em;
83
+ }
84
+ }
85
+
86
+ &.button-icon {
87
+ width: $size;
88
+ padding: 0;
89
+ }
90
+ }
91
+
92
+ .button {
93
+
94
+ @include size(md, 2rem);
95
+ &-xs { @include size(xs, 1rem); }
96
+ &-sm { @include size(sm, 1.5rem); }
97
+ &-lg { @include size(lg, 2.5rem); }
98
+ }
99
+
100
+ // —————————————————————————————————————————————————————————————————
101
+ // color
102
+ // —————————————————————————————————————————————————————————————————
103
+
104
+ @mixin color($prefix, $colors...) {
105
+
106
+ @each $i in $colors {
107
+ .#{$prefix}#{list.nth($i, 1)} {
108
+ background-color: list.nth($i, 2);
109
+ color: list.nth($i, 3);
110
+
111
+ &:focus {
112
+ outline: 2px solid list.nth($i, 2);
113
+ }
114
+
115
+ @include mixins.hover {
116
+
117
+ &:not(.button-disabled) {
118
+ background-color: color.mix(black, list.nth($i, 2), 20%);
119
+ }
120
+ }
121
+
122
+ &.button-stroke {
123
+ background-color: transparent;
124
+ border: 1px solid list.nth($i, 2);
125
+ color: variables.$text;
126
+
127
+ @include mixins.hover {
128
+
129
+ &:not(.button-disabled) {
130
+ background-color: variables.$hover;
131
+ }
132
+ }
133
+
134
+ svg { stroke: variables.$text; }
135
+ }
136
+
137
+ &.button-transparent {
138
+ background-color: transparent;
139
+ color: list.nth($i, 2);
140
+
141
+ @include mixins.hover { background-color: variables.$hover; }
142
+ svg { stroke: list.nth($i, 2); }
143
+ }
144
+ }
145
+ }
146
+ }
147
+
148
+ @include color('button',
149
+ '' variables.$primary variables.$primary-contrast,
150
+ '-secondary' variables.$secondary variables.$secondary-contrast,
151
+ '-grey' variables.$text-disabled variables.$text,
152
+ '-success' variables.$success variables.$success-contrast,
153
+ '-info' variables.$info variables.$info-contrast,
154
+ '-warning' variables.$warning variables.$warning-contrast,
155
+ '-error' variables.$error variables.$error-contrast,
156
+ '-main' variables.$main variables.$text,
157
+ '-contrast' variables.$contrast variables.$text-contrast
158
+ );
159
+
160
+ // —————————————————————————————————————————————————————————————————
161
+ // fullWidth
162
+ // —————————————————————————————————————————————————————————————————
163
+
164
+ .button-fullWidth {
165
+ width: 100%;
166
+ }
167
+
168
+ // —————————————————————————————————————————————————————————————————
169
+ // disabled
170
+ // —————————————————————————————————————————————————————————————————
171
+
172
+ .button {
173
+
174
+ &.button-disabled,
175
+ &:disabled {
176
+ opacity: 0.3;
177
+ cursor: not-allowed;
178
+ outline: none;
179
+ }
180
+ }
@@ -0,0 +1,52 @@
1
+ @use "../common/mixins";
2
+
3
+ // —————————————————————————————————————————————————————————————————
4
+ // elements
5
+ // direction
6
+ // fullWidth
7
+ // wide
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ // —————————————————————————————————————————————————————————————————
11
+ // elements
12
+ // —————————————————————————————————————————————————————————————————
13
+
14
+ .buttons {
15
+ display: flex;
16
+ flex-wrap: wrap; // set on multiple lines if wider than parent width
17
+ width: 100%;
18
+ gap: .5rem;
19
+
20
+ // larger spacing on small and touch devices
21
+ @include mixins.responsive(down, mobile) { gap: 1rem; }
22
+ @include mixins.responsive-touch { gap: 1rem; }
23
+ }
24
+
25
+ // —————————————————————————————————————————————————————————————————
26
+ // direction
27
+ // —————————————————————————————————————————————————————————————————
28
+
29
+ .buttons-portrait {
30
+ flex-direction: column;
31
+ align-items: flex-start;
32
+ }
33
+
34
+ // —————————————————————————————————————————————————————————————————
35
+ // fullWidth
36
+ // —————————————————————————————————————————————————————————————————
37
+
38
+ .buttons-fullWidth .button {
39
+ width: 100%;
40
+ }
41
+
42
+ // —————————————————————————————————————————————————————————————————
43
+ // wide
44
+ // —————————————————————————————————————————————————————————————————
45
+
46
+ .buttons-wide {
47
+ justify-content: space-between;
48
+
49
+ > .buttons {
50
+ width: fit-content;
51
+ }
52
+ }