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,192 @@
1
+ @use "../common/mixins";
2
+ @use "../common/variables";
3
+
4
+ // —————————————————————————————————————————————————————————————————
5
+ // elements
6
+ // align
7
+ // —————————————————————————————————————————————————————————————————
8
+
9
+ // button apparition
10
+ @include mixins.keyframes(button-menu-opacity) {
11
+ 0% { opacity: 0; }
12
+ 50% { opacity: 0; }
13
+ 100% { opacity: 100%; }
14
+ }
15
+
16
+ // lines > close
17
+ @include mixins.keyframes(button-menu-open-before) {
18
+ 0% { transform: translateY(variables.$spacing-xs*1.5); }
19
+ 50% { transform: translateY(0);
20
+ transform: rotate(0); }
21
+ 100% { transform: rotate(45deg); }
22
+ }
23
+ @include mixins.keyframes(button-menu-open-after) {
24
+ 0% { transform: translateY(-(variables.$spacing-xs)*1.5); }
25
+ 50% { transform: translateY(0);
26
+ transform: rotate(0); }
27
+ 100% { transform: rotate(-45deg); }
28
+ }
29
+
30
+ // close > lines
31
+ @include mixins.keyframes(button-menu-close-before) {
32
+ 0% { transform: rotate(45deg); }
33
+ 50% { transform: rotate(0);
34
+ transform: translateY(0); }
35
+ 100% { transform: translateY(variables.$spacing-xs*1.5); }
36
+ }
37
+ @include mixins.keyframes(button-menu-close-after) {
38
+ 0% { transform: rotate(-45deg); }
39
+ 50% { transform: rotate(0);
40
+ transform: translateY(0); }
41
+ 100% { transform: translateY(-(variables.$spacing-xs)*1.5); }
42
+ }
43
+
44
+ // —————————————————————————————————————————————————————————————————
45
+ // elements
46
+ // —————————————————————————————————————————————————————————————————
47
+
48
+ .navbar {
49
+ top: 0;
50
+ left: 0;
51
+ width: 100%;
52
+ background-color: variables.$background-paper;
53
+ border-bottom: variables.$border;
54
+ z-index: 13;
55
+
56
+ @include mixins.responsive(up, tablet) {
57
+ height: variables.$navbar-height;
58
+ }
59
+
60
+ @include mixins.responsive(down, tablet) {
61
+ z-index: 11;
62
+ }
63
+
64
+ &.section {
65
+ overflow: visible;
66
+ position: sticky;
67
+ }
68
+
69
+ .section_container {
70
+ display: flex;
71
+ flex-direction: row;
72
+ align-items: center;
73
+ justify-content: space-between;
74
+ padding-top: 0;
75
+ padding-bottom: 0;
76
+
77
+ @include mixins.responsive(up, tablet) {
78
+ height: 100%;
79
+ }
80
+
81
+ @include mixins.responsive(down, tablet) {
82
+ flex-direction: column;
83
+ align-items: stretch;
84
+ padding-top: 0;
85
+ }
86
+ }
87
+
88
+ &__main {
89
+ display: flex;
90
+ align-items: center;
91
+
92
+ @include mixins.responsive(down, tablet) {
93
+ height: variables.$navbar-height-sm;
94
+ }
95
+ }
96
+
97
+ &__logo {
98
+ display: flex;
99
+ align-items: baseline;
100
+ font-weight: variables.$font-bold;
101
+ flex-grow: 1;
102
+
103
+ > * {
104
+ margin-right: variables.$spacing-xs;
105
+ }
106
+ }
107
+
108
+ &__button {
109
+ @include mixins.transition(variables.$transition-md, opacity);
110
+ animation: button-menu-opacity variables.$transition-lg;
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ cursor: pointer;
115
+ position: relative;
116
+ width: variables.$spacing-md;
117
+ height: variables.$spacing-md;
118
+
119
+ @include mixins.responsive(up, tablet) {
120
+ display: none;
121
+ }
122
+
123
+ &:before,
124
+ &:after,
125
+ span {
126
+ background-color: variables.$text;
127
+ border-radius: 0.15rem;
128
+ }
129
+
130
+ &:before,
131
+ &:after {
132
+ @include mixins.pseudo-element('', auto, auto, auto, auto, variables.$spacing-md, 2px);
133
+ @include mixins.transition(variables.$transition-md, transform);
134
+ }
135
+
136
+ &:before {
137
+ transform: translateY(variables.$spacing-xs*1.5);
138
+ animation: button-menu-close-before variables.$transition-lg;
139
+ }
140
+
141
+ &:after {
142
+ transform: translateY(-(variables.$spacing-xs)*1.5);
143
+ animation: button-menu-close-after variables.$transition-lg;
144
+ }
145
+
146
+ span {
147
+ @include mixins.transition(variables.$transition-md, opacity);
148
+ position: absolute;
149
+ width: variables.$spacing-md;
150
+ height: 2px;
151
+ }
152
+
153
+ &.js-opened {
154
+
155
+ &:before { animation: button-menu-open-before variables.$transition-lg forwards; }
156
+ &:after { animation: button-menu-open-after variables.$transition-lg forwards; }
157
+ span { opacity: 0; }
158
+ }
159
+ }
160
+
161
+ &__nav {
162
+
163
+ @include mixins.responsive(down, tablet) {
164
+ @include mixins.transition(variables.$transition-md, max-height);
165
+ align-items: flex-start;
166
+ max-height: 0;
167
+ overflow: hidden;
168
+
169
+ .js-opened & {
170
+ max-height: 80vh;
171
+ }
172
+ }
173
+ }
174
+ }
175
+
176
+ // —————————————————————————————————————————————————————————————————
177
+ // align
178
+ // —————————————————————————————————————————————————————————————————
179
+
180
+ .navbar--right {
181
+
182
+ .section_container {
183
+
184
+ @include mixins.responsive(up, tablet) {
185
+ flex-direction: row-reverse;
186
+ }
187
+ }
188
+
189
+ .navbar__main {
190
+ flex-direction: row-reverse;
191
+ }
192
+ }
@@ -0,0 +1,33 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // elements
3
+ // withSidebar
4
+ // —————————————————————————————————————————————————————————————————
5
+
6
+ // —————————————————————————————————————————————————————————————————
7
+ // elements
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ .page {
11
+ display: flex;
12
+ flex-direction: column;
13
+ min-height: 100vh;
14
+
15
+ &__content {
16
+ width: 100%;
17
+ }
18
+ }
19
+
20
+ // —————————————————————————————————————————————————————————————————
21
+ // withSidebar
22
+ // —————————————————————————————————————————————————————————————————
23
+
24
+ .page--withSidebar {
25
+
26
+ .page__container {
27
+ display: flex;
28
+ }
29
+
30
+ .section_container {
31
+ max-width: none;
32
+ }
33
+ }
@@ -0,0 +1,193 @@
1
+ @use "../common/mixins";
2
+ @use "../common/variables";
3
+ @use "../utilities/text";
4
+
5
+ // —————————————————————————————————————————————————————————————————
6
+ // elements
7
+ // align
8
+ // color
9
+ // landing (website title on homepage)
10
+ // header (page title)
11
+ // —————————————————————————————————————————————————————————————————
12
+
13
+ // —————————————————————————————————————————————————————————————————
14
+ // elements
15
+ // —————————————————————————————————————————————————————————————————
16
+
17
+ .section {
18
+ @include mixins.clamp(padding-right, 1rem, 4vw, 4rem);
19
+ @include mixins.clamp(padding-left, 1rem, 4vw, 4rem);
20
+ width: 100%;
21
+ overflow: hidden; // prevent horizontal scroll on mobile
22
+ position: relative;
23
+ display: flex;
24
+ flex-direction: column;
25
+ align-items: center;
26
+
27
+ &_container {
28
+ @include mixins.clamp(padding-top, 2rem, 8vw, 4rem);
29
+ @include mixins.clamp(padding-bottom, 2rem, 8vw, 4rem);
30
+ width: 100%;
31
+ max-width: variables.$desktop;
32
+ position: relative; // needed to have the content over section-landing:before
33
+ }
34
+
35
+ &_header {
36
+ display: flex;
37
+ flex-direction: column;
38
+
39
+ & + .section_content { @include mixins.clamp(padding-top, 2rem, 8vw, 4rem); }
40
+ &-dense + .section_content { padding-top: 2rem; }
41
+ }
42
+
43
+ &_content {
44
+ width: 100%;
45
+
46
+ & + & {
47
+ @include mixins.clamp(padding-top, 2rem, 8vw, 4rem);
48
+ }
49
+ }
50
+
51
+ &_label {
52
+ color: variables.$text-alt;
53
+ font-weight: variables.$font-bold;
54
+ }
55
+
56
+ &_title {
57
+ @extend %h3;
58
+ color: variables.$primary;
59
+ max-width: variables.$desktop*0.75;
60
+
61
+ .section_label + & {
62
+ margin-top: .5rem;
63
+ }
64
+ }
65
+
66
+ &_subtitle {
67
+ @extend %subtitle;
68
+ max-width: variables.$max-width-subtitle;
69
+
70
+ .section_title + & {
71
+ margin-top: 2rem - 1rem;
72
+ }
73
+
74
+ & + & {
75
+ margin-top: 1rem;
76
+ }
77
+ }
78
+
79
+ &_actions {
80
+
81
+ .section_title + &,
82
+ .section_subtitle + & {
83
+ margin-top: 2rem;
84
+ }
85
+ }
86
+ }
87
+
88
+ // —————————————————————————————————————————————————————————————————
89
+ // align
90
+ // —————————————————————————————————————————————————————————————————
91
+
92
+ .section_container {
93
+ align-items: flex-start;
94
+ text-align: left;
95
+ }
96
+
97
+ .section-center .section_container,
98
+ .section-center .section_header,
99
+ .section_content-center {
100
+ align-items: center;
101
+ text-align: center;
102
+ }
103
+
104
+ .section-right .section_container,
105
+ .section-right .section_header,
106
+ .section_content-right {
107
+ align-items: flex-end;
108
+ text-align: right;
109
+ }
110
+
111
+ // —————————————————————————————————————————————————————————————————
112
+ // color
113
+ // —————————————————————————————————————————————————————————————————
114
+
115
+ @mixin color(
116
+ $background-color,
117
+ $title-color: variables.$primary,
118
+ $color: variables.$text,
119
+ $paper-color: variables.$background-paper,
120
+ $border-color: variables.$border-color
121
+ ) {
122
+ background-color: $background-color;
123
+ color: $color;
124
+
125
+ & + & {
126
+
127
+ .section_container {
128
+ padding-top: 0;
129
+ }
130
+ }
131
+
132
+ .section_title { color: $title-color; }
133
+ .button-stroke { color: $color; }
134
+ .snippet {
135
+ border-color: $border-color;
136
+ }
137
+ }
138
+
139
+ .section {
140
+ &-default { @include color(variables.$background-default); }
141
+ &-paper { @include color(variables.$background-paper); }
142
+ &-primary { @include color(
143
+ variables.$primary, // background-color
144
+ variables.$primary-contrast, // title-color
145
+ variables.$primary-contrast, // color
146
+ variables.$hover-contrast, // paper-color
147
+ variables.$border-color-contrast // border-color
148
+ );}
149
+ &-primaryLight { @include color(
150
+ variables.$primary-light, // background-color
151
+ variables.$text, // title-color
152
+ variables.$text, // color
153
+ variables.$hover-contrast, // paper-color
154
+ variables.$border-color-contrast // border-color
155
+ );}
156
+ }
157
+
158
+ // —————————————————————————————————————————————————————————————————
159
+ // landing (website title on homepage)
160
+ // —————————————————————————————————————————————————————————————————
161
+
162
+ .section-landing {
163
+
164
+ .section {
165
+
166
+ &_container {
167
+ @include mixins.clamp(padding-top, 2rem, 10vw, 7rem);
168
+ @include mixins.clamp(padding-bottom, 2rem, 10vw, 7rem);
169
+ }
170
+
171
+ &_title { @extend %h1; max-width: variables.$desktop*0.5; }
172
+ &_subtitle { @extend %h5; }
173
+ &_title + .section_subtitle { margin-top: 2rem; }
174
+ &_title + .section_actions,
175
+ &_subtitle + .section_actions { margin-top: 3rem; }
176
+ }
177
+ }
178
+
179
+ // —————————————————————————————————————————————————————————————————
180
+ // header (page title)
181
+ // —————————————————————————————————————————————————————————————————
182
+
183
+ .section-header {
184
+
185
+ .section {
186
+
187
+ &_title { @extend %h2; }
188
+ &_subtitle { @extend %subtitle; }
189
+ &_title + .section_subtitle { margin-top: 2rem; }
190
+ &_title + .section_actions,
191
+ &_subtitle + .section_actions { margin-top: 2.5rem; }
192
+ }
193
+ }
@@ -0,0 +1,61 @@
1
+ @use "../common/mixins";
2
+ @use "../common/variables";
3
+ @use "../utilities/text";
4
+
5
+ $sidebar-width: 200px;
6
+
7
+ .sidebar {
8
+ transition: left variables.$transition-md;
9
+ @include mixins.calc(height, '100vh - 'variables.$navbar-height);
10
+ position: sticky;
11
+ flex-shrink: 0;
12
+ border-right: variables.$border;
13
+ width: $sidebar-width;
14
+ top: variables.$navbar-height;
15
+ padding: variables.$spacing-md;
16
+ overflow-y: scroll;
17
+ scrollbar-color: light;
18
+ z-index: 11;
19
+ background-color: variables.$background-default;
20
+
21
+ &.js-opened {
22
+ left: 0;
23
+ }
24
+
25
+ @include mixins.responsive(down, tablet) {
26
+ position: fixed;
27
+ height: 100vh;
28
+ top: 0;
29
+ left: -$sidebar-width;
30
+ padding-top: variables.$navbar-height-sm;
31
+ z-index: 13;
32
+ }
33
+
34
+ &__button {
35
+ content: '';
36
+ border: solid variables.$text;
37
+ border-width: 0 2px 2px 0;
38
+ padding: 4px;
39
+ transform: rotate(-45deg);
40
+ margin-right: variables.$spacing-md;
41
+ display: none;
42
+
43
+ .page--withSidebar & { display: initial; }
44
+ @include mixins.responsive(up, tablet) { display: none !important; }
45
+
46
+ &--close {
47
+ position: absolute;
48
+ top: variables.$navbar-height-sm*0.5;
49
+ left: variables.$navbar-height-sm*0.5;
50
+ transform: translateY(-50%) rotate(135deg);
51
+ }
52
+ }
53
+
54
+ &__title {
55
+ @extend %overline;
56
+ color: variables.$text-alt;
57
+ font-weight: variables.$font-bold;
58
+ margin-bottom: variables.$spacing-xs;
59
+ margin-left: 0;
60
+ }
61
+ }
@@ -0,0 +1,85 @@
1
+ @use "../common/variables";
2
+ @use "../utilities/text";
3
+
4
+ // —————————————————————————————————————————————————————————————————
5
+ // elements
6
+ // default
7
+ // dense
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ // —————————————————————————————————————————————————————————————————
11
+ // elements
12
+ // —————————————————————————————————————————————————————————————————
13
+
14
+ .snippet {
15
+ @extend %caption;
16
+ font-family: "Roboto Mono", Courier, monospace;
17
+ word-wrap: break-word;
18
+ width: 100%;
19
+ position: relative;
20
+ border-radius: variables.$border-radius-sm;
21
+ margin: 0;
22
+ padding: variables.$spacing-sm variables.$spacing-sm*1.5;
23
+ background-color: variables.$hover;
24
+ border: variables.$border;
25
+
26
+ & + & {
27
+ margin-top: variables.$spacing-sm;
28
+ }
29
+
30
+ p > & {
31
+ margin-right: variables.$spacing-xs;
32
+ margin-left: variables.$spacing-xs;
33
+ }
34
+
35
+ .tag {
36
+ font-family: variables.$font-fallback;
37
+ float: right;
38
+ margin-top: 1px;
39
+ margin-right: -(variables.$spacing-xs);
40
+ }
41
+ }
42
+
43
+ // —————————————————————————————————————————————————————————————————
44
+ // default
45
+ // —————————————————————————————————————————————————————————————————
46
+
47
+ .snippet--default {
48
+
49
+ &:after {
50
+ @extend %overline;
51
+ content: "Default";
52
+ font-family: variables.$font-fallback;
53
+ float: right;
54
+ margin-top: 1px;
55
+ margin-right: -(variables.$spacing-xs);
56
+ display: inline-flex;
57
+ align-items: center;
58
+ justify-content: center;
59
+ font-weight: variables.$font-bold;
60
+ border-radius: variables.$border-radius-sm;
61
+ white-space: nowrap; // prevent text to go on multiple lines
62
+ position: absolute;
63
+ top: variables.$spacing-sm;
64
+ right: variables.$spacing-md*0.75;
65
+ height: variables.$spacing-md;
66
+ padding-right: variables.$spacing-xs;
67
+ padding-left: variables.$spacing-xs;
68
+ padding-bottom: 0.1em;
69
+ background-color: variables.$text-disabled;
70
+ }
71
+ }
72
+
73
+ // —————————————————————————————————————————————————————————————————
74
+ // dense
75
+ // —————————————————————————————————————————————————————————————————
76
+
77
+ .snippet--dense {
78
+ @extend %overline;
79
+ padding: variables.$spacing-xs variables.$spacing-sm !important;
80
+
81
+ &.snippet--default:after {
82
+ top: variables.$spacing-xs;
83
+ right: variables.$spacing-sm;
84
+ }
85
+ }
@@ -0,0 +1,60 @@
1
+ @use "../common/variables";
2
+ @use "../utilities/text";
3
+
4
+ // —————————————————————————————————————————————————————————————————
5
+ // elements
6
+ // color
7
+ // dense
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ $spacing-status: .5rem;
11
+
12
+ // —————————————————————————————————————————————————————————————————
13
+ // elements
14
+ // —————————————————————————————————————————————————————————————————
15
+
16
+ .status {
17
+
18
+ &:before {
19
+ content: "";
20
+ display: inline-block;
21
+ height: $spacing-status;
22
+ width: $spacing-status;
23
+ background-color: variables.$text-alt;
24
+ border-radius: 50%;
25
+ margin-right: 0.35em;
26
+ transform: translateY(-0.05em);
27
+ }
28
+ }
29
+
30
+ // —————————————————————————————————————————————————————————————————
31
+ // color
32
+ // —————————————————————————————————————————————————————————————————
33
+
34
+ @mixin color($color) {
35
+
36
+ &:before {
37
+ background-color: $color;
38
+ }
39
+ }
40
+
41
+ .status {
42
+
43
+ &-success { @include color(variables.$success); }
44
+ &-info { @include color(variables.$info); }
45
+ &-warning { @include color(variables.$warning); }
46
+ &-error { @include color(variables.$error); }
47
+ }
48
+
49
+ // —————————————————————————————————————————————————————————————————
50
+ // dense
51
+ // —————————————————————————————————————————————————————————————————
52
+
53
+ .status-dense {
54
+ @extend %caption;
55
+
56
+ &:before {
57
+ height: $spacing-status*0.75;
58
+ width: $spacing-status*0.75;
59
+ }
60
+ }