pallote-css 0.3.10 → 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 (61) hide show
  1. package/README.md +0 -144
  2. package/dist/pallote.min.css +1 -1
  3. package/dist/pallote.min.css.map +1 -1
  4. package/dist/pallote.scss +31 -36
  5. package/dist/styles/common/_editor.scss +29 -25
  6. package/dist/styles/common/_fontface.scss +7 -4
  7. package/dist/styles/common/_global.scss +25 -22
  8. package/dist/styles/common/_mixins.scss +19 -16
  9. package/dist/styles/common/_reset.scss +4 -2
  10. package/dist/styles/common/_variables.scss +28 -25
  11. package/dist/styles/components/_accordion.scss +16 -13
  12. package/dist/styles/components/_alert.scss +44 -40
  13. package/dist/styles/components/_breadcrumbs.scss +8 -5
  14. package/dist/styles/components/_button.scss +32 -26
  15. package/dist/styles/components/_buttons.scss +4 -2
  16. package/dist/styles/components/_card.scss +14 -11
  17. package/dist/styles/components/_divider.scss +3 -1
  18. package/dist/styles/components/_form.scss +4 -1
  19. package/dist/styles/components/_grid.scss +11 -8
  20. package/dist/styles/components/_input.scss +36 -32
  21. package/dist/styles/components/_link.scss +7 -4
  22. package/dist/styles/components/_list.scss +2 -0
  23. package/dist/styles/components/_nav.scss +49 -45
  24. package/dist/styles/components/_navbar.scss +42 -39
  25. package/dist/styles/components/_section.scss +35 -31
  26. package/dist/styles/components/_sidebar.scss +20 -16
  27. package/dist/styles/components/_snippet.scss +25 -22
  28. package/dist/styles/components/_status.scss +8 -5
  29. package/dist/styles/components/_switch.scss +11 -8
  30. package/dist/styles/components/_tabs.scss +18 -15
  31. package/dist/styles/components/_tag.scss +16 -12
  32. package/dist/styles/utilities/_color.scss +84 -81
  33. package/dist/styles/utilities/_global.scss +23 -20
  34. package/dist/styles/utilities/_text.scss +55 -51
  35. package/package.json +12 -8
  36. package/dist/assets/fonts/SourceSansPro/regular.woff2 +0 -0
  37. package/dist/assets/fonts/SourceSansPro/regularitalic.woff2 +0 -0
  38. package/dist/assets/fonts/SourceSansPro/semibold.woff2 +0 -0
  39. package/dist/assets/fonts/SourceSansPro/semibolditalic.woff2 +0 -0
  40. package/dist/assets/icons/logos/patreon.svg +0 -3
  41. package/dist/assets/icons/phosphor/arrow-right.svg +0 -1
  42. package/dist/assets/icons/phosphor/arrow-square-out.svg +0 -1
  43. package/dist/assets/icons/phosphor/caret-down.svg +0 -1
  44. package/dist/assets/icons/phosphor/check-circle.svg +0 -1
  45. package/dist/assets/icons/phosphor/check.svg +0 -1
  46. package/dist/assets/icons/phosphor/coffee.svg +0 -1
  47. package/dist/assets/icons/phosphor/download-simple.svg +0 -1
  48. package/dist/assets/icons/phosphor/envelope-simple.svg +0 -1
  49. package/dist/assets/icons/phosphor/files.svg +0 -1
  50. package/dist/assets/icons/phosphor/info.svg +0 -1
  51. package/dist/assets/icons/phosphor/warning.svg +0 -1
  52. package/dist/assets/icons/phosphor/x-circle.svg +0 -1
  53. package/dist/assets/icons/rabbit.svg +0 -1
  54. package/dist/scripts/accordion.js +0 -42
  55. package/dist/scripts/button.js +0 -5
  56. package/dist/scripts/cookie.js +0 -15
  57. package/dist/scripts/input.js +0 -18
  58. package/dist/scripts/nav.js +0 -22
  59. package/dist/scripts/navbar.js +0 -28
  60. package/dist/scripts/switch.js +0 -3
  61. package/dist/scripts/tabs.js +0 -30
@@ -1,3 +1,7 @@
1
+ @use "../common/mixins";
2
+ @use "../common/variables";
3
+ @use "../utilities/text";
4
+
1
5
  // —————————————————————————————————————————————————————————————————
2
6
  // elements
3
7
  // align
@@ -11,8 +15,8 @@
11
15
  // —————————————————————————————————————————————————————————————————
12
16
 
13
17
  .section {
14
- @include clamp(padding-right, 1rem, 4vw, 4rem);
15
- @include clamp(padding-left, 1rem, 4vw, 4rem);
18
+ @include mixins.clamp(padding-right, 1rem, 4vw, 4rem);
19
+ @include mixins.clamp(padding-left, 1rem, 4vw, 4rem);
16
20
  width: 100%;
17
21
  overflow: hidden; // prevent horizontal scroll on mobile
18
22
  position: relative;
@@ -21,10 +25,10 @@
21
25
  align-items: center;
22
26
 
23
27
  &_container {
24
- @include clamp(padding-top, 2rem, 8vw, 4rem);
25
- @include clamp(padding-bottom, 2rem, 8vw, 4rem);
28
+ @include mixins.clamp(padding-top, 2rem, 8vw, 4rem);
29
+ @include mixins.clamp(padding-bottom, 2rem, 8vw, 4rem);
26
30
  width: 100%;
27
- max-width: $desktop;
31
+ max-width: variables.$desktop;
28
32
  position: relative; // needed to have the content over section-landing:before
29
33
  }
30
34
 
@@ -32,7 +36,7 @@
32
36
  display: flex;
33
37
  flex-direction: column;
34
38
 
35
- & + .section_content { @include clamp(padding-top, 2rem, 8vw, 4rem); }
39
+ & + .section_content { @include mixins.clamp(padding-top, 2rem, 8vw, 4rem); }
36
40
  &-dense + .section_content { padding-top: 2rem; }
37
41
  }
38
42
 
@@ -40,19 +44,19 @@
40
44
  width: 100%;
41
45
 
42
46
  & + & {
43
- @include clamp(padding-top, 2rem, 8vw, 4rem);
47
+ @include mixins.clamp(padding-top, 2rem, 8vw, 4rem);
44
48
  }
45
49
  }
46
50
 
47
51
  &_label {
48
- color: $text-alt;
49
- font-weight: $font-bold;
52
+ color: variables.$text-alt;
53
+ font-weight: variables.$font-bold;
50
54
  }
51
55
 
52
56
  &_title {
53
57
  @extend %h3;
54
- color: $primary;
55
- max-width: $desktop*0.75;
58
+ color: variables.$primary;
59
+ max-width: variables.$desktop*0.75;
56
60
 
57
61
  .section_label + & {
58
62
  margin-top: .5rem;
@@ -61,7 +65,7 @@
61
65
 
62
66
  &_subtitle {
63
67
  @extend %subtitle;
64
- max-width: $max-width-subtitle;
68
+ max-width: variables.$max-width-subtitle;
65
69
 
66
70
  .section_title + & {
67
71
  margin-top: 2rem - 1rem;
@@ -110,10 +114,10 @@
110
114
 
111
115
  @mixin color(
112
116
  $background-color,
113
- $title-color: $primary,
114
- $color: $text,
115
- $paper-color: $background-paper,
116
- $border-color: $border-color
117
+ $title-color: variables.$primary,
118
+ $color: variables.$text,
119
+ $paper-color: variables.$background-paper,
120
+ $border-color: variables.$border-color
117
121
  ) {
118
122
  background-color: $background-color;
119
123
  color: $color;
@@ -133,21 +137,21 @@
133
137
  }
134
138
 
135
139
  .section {
136
- &-default { @include color($background-default); }
137
- &-paper { @include color($background-paper); }
140
+ &-default { @include color(variables.$background-default); }
141
+ &-paper { @include color(variables.$background-paper); }
138
142
  &-primary { @include color(
139
- $primary, // background-color
140
- $primary-contrast, // title-color
141
- $primary-contrast, // color
142
- $hover-contrast, // paper-color
143
- $border-color-contrast // border-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
144
148
  );}
145
149
  &-primaryLight { @include color(
146
- $primary-light, // background-color
147
- $text, // title-color
148
- $text, // color
149
- $hover-contrast, // paper-color
150
- $border-color-contrast // border-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
151
155
  );}
152
156
  }
153
157
 
@@ -160,11 +164,11 @@
160
164
  .section {
161
165
 
162
166
  &_container {
163
- @include clamp(padding-top, 2rem, 10vw, 7rem);
164
- @include clamp(padding-bottom, 2rem, 10vw, 7rem);
167
+ @include mixins.clamp(padding-top, 2rem, 10vw, 7rem);
168
+ @include mixins.clamp(padding-bottom, 2rem, 10vw, 7rem);
165
169
  }
166
170
 
167
- &_title { @extend %h1; max-width: $desktop*0.5; }
171
+ &_title { @extend %h1; max-width: variables.$desktop*0.5; }
168
172
  &_subtitle { @extend %h5; }
169
173
  &_title + .section_subtitle { margin-top: 2rem; }
170
174
  &_title + .section_actions,
@@ -1,57 +1,61 @@
1
+ @use "../common/mixins";
2
+ @use "../common/variables";
3
+ @use "../utilities/text";
4
+
1
5
  $sidebar-width: 200px;
2
6
 
3
7
  .sidebar {
4
- transition: left $transition-md;
5
- @include calc(height, '100vh - '$navbar-height);
8
+ transition: left variables.$transition-md;
9
+ @include mixins.calc(height, '100vh - 'variables.$navbar-height);
6
10
  position: sticky;
7
11
  flex-shrink: 0;
8
- border-right: $border;
12
+ border-right: variables.$border;
9
13
  width: $sidebar-width;
10
- top: $navbar-height;
11
- padding: $spacing-md;
14
+ top: variables.$navbar-height;
15
+ padding: variables.$spacing-md;
12
16
  overflow-y: scroll;
13
17
  scrollbar-color: light;
14
18
  z-index: 11;
15
- background-color: $background-default;
19
+ background-color: variables.$background-default;
16
20
 
17
21
  &.js-opened {
18
22
  left: 0;
19
23
  }
20
24
 
21
- @include responsive(down, tablet) {
25
+ @include mixins.responsive(down, tablet) {
22
26
  position: fixed;
23
27
  height: 100vh;
24
28
  top: 0;
25
29
  left: -$sidebar-width;
26
- padding-top: $navbar-height-sm;
30
+ padding-top: variables.$navbar-height-sm;
27
31
  z-index: 13;
28
32
  }
29
33
 
30
34
  &__button {
31
35
  content: '';
32
- border: solid $text;
36
+ border: solid variables.$text;
33
37
  border-width: 0 2px 2px 0;
34
38
  padding: 4px;
35
39
  transform: rotate(-45deg);
36
- margin-right: $spacing-md;
40
+ margin-right: variables.$spacing-md;
37
41
  display: none;
38
42
 
39
43
  .page--withSidebar & { display: initial; }
40
- @include responsive(up, tablet) { display: none !important; }
44
+ @include mixins.responsive(up, tablet) { display: none !important; }
41
45
 
42
46
  &--close {
43
47
  position: absolute;
44
- top: $navbar-height-sm*0.5;
45
- left: $navbar-height-sm*0.5;
48
+ top: variables.$navbar-height-sm*0.5;
49
+ left: variables.$navbar-height-sm*0.5;
46
50
  transform: translateY(-50%) rotate(135deg);
47
51
  }
48
52
  }
49
53
 
50
54
  &__title {
51
55
  @extend %overline;
52
- color: $text-alt;
53
- font-weight: $font-bold;
54
- margin-bottom: $spacing-xs;
56
+ color: variables.$text-alt;
57
+ font-weight: variables.$font-bold;
58
+ margin-bottom: variables.$spacing-xs;
55
59
  margin-left: 0;
56
60
  }
57
61
  }
@@ -1,3 +1,6 @@
1
+ @use "../common/variables";
2
+ @use "../utilities/text";
3
+
1
4
  // —————————————————————————————————————————————————————————————————
2
5
  // elements
3
6
  // default
@@ -14,26 +17,26 @@
14
17
  word-wrap: break-word;
15
18
  width: 100%;
16
19
  position: relative;
17
- border-radius: $border-radius-sm;
20
+ border-radius: variables.$border-radius-sm;
18
21
  margin: 0;
19
- padding: $spacing-sm $spacing-sm*1.5;
20
- background-color: $hover;
21
- border: $border;
22
+ padding: variables.$spacing-sm variables.$spacing-sm*1.5;
23
+ background-color: variables.$hover;
24
+ border: variables.$border;
22
25
 
23
26
  & + & {
24
- margin-top: $spacing-sm;
27
+ margin-top: variables.$spacing-sm;
25
28
  }
26
29
 
27
30
  p > & {
28
- margin-right: $spacing-xs;
29
- margin-left: $spacing-xs;
31
+ margin-right: variables.$spacing-xs;
32
+ margin-left: variables.$spacing-xs;
30
33
  }
31
34
 
32
35
  .tag {
33
- font-family: $font, $font-fallback;
36
+ font-family: variables.$font-fallback;
34
37
  float: right;
35
38
  margin-top: 1px;
36
- margin-right: -$spacing-xs;
39
+ margin-right: -(variables.$spacing-xs);
37
40
  }
38
41
  }
39
42
 
@@ -46,24 +49,24 @@
46
49
  &:after {
47
50
  @extend %overline;
48
51
  content: "Default";
49
- font-family: $font, $font-fallback;
52
+ font-family: variables.$font-fallback;
50
53
  float: right;
51
54
  margin-top: 1px;
52
- margin-right: -$spacing-xs;
55
+ margin-right: -(variables.$spacing-xs);
53
56
  display: inline-flex;
54
57
  align-items: center;
55
58
  justify-content: center;
56
- font-weight: $font-bold;
57
- border-radius: $border-radius-sm;
59
+ font-weight: variables.$font-bold;
60
+ border-radius: variables.$border-radius-sm;
58
61
  white-space: nowrap; // prevent text to go on multiple lines
59
62
  position: absolute;
60
- top: $spacing-sm;
61
- right: $spacing-md*0.75;
62
- height: $spacing-md;
63
- padding-right: $spacing-xs;
64
- padding-left: $spacing-xs;
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;
65
68
  padding-bottom: 0.1em;
66
- background-color: $text-disabled;
69
+ background-color: variables.$text-disabled;
67
70
  }
68
71
  }
69
72
 
@@ -73,10 +76,10 @@
73
76
 
74
77
  .snippet--dense {
75
78
  @extend %overline;
76
- padding: $spacing-xs $spacing-sm !important;
79
+ padding: variables.$spacing-xs variables.$spacing-sm !important;
77
80
 
78
81
  &.snippet--default:after {
79
- top: $spacing-xs;
80
- right: $spacing-sm;
82
+ top: variables.$spacing-xs;
83
+ right: variables.$spacing-sm;
81
84
  }
82
85
  }
@@ -1,3 +1,6 @@
1
+ @use "../common/variables";
2
+ @use "../utilities/text";
3
+
1
4
  // —————————————————————————————————————————————————————————————————
2
5
  // elements
3
6
  // color
@@ -17,7 +20,7 @@ $spacing-status: .5rem;
17
20
  display: inline-block;
18
21
  height: $spacing-status;
19
22
  width: $spacing-status;
20
- background-color: $text-alt;
23
+ background-color: variables.$text-alt;
21
24
  border-radius: 50%;
22
25
  margin-right: 0.35em;
23
26
  transform: translateY(-0.05em);
@@ -37,10 +40,10 @@ $spacing-status: .5rem;
37
40
 
38
41
  .status {
39
42
 
40
- &-success { @include color($success); }
41
- &-info { @include color($info); }
42
- &-warning { @include color($warning); }
43
- &-error { @include color($error); }
43
+ &-success { @include color(variables.$success); }
44
+ &-info { @include color(variables.$info); }
45
+ &-warning { @include color(variables.$warning); }
46
+ &-error { @include color(variables.$error); }
44
47
  }
45
48
 
46
49
  // —————————————————————————————————————————————————————————————————
@@ -1,3 +1,6 @@
1
+ @use "../common/mixins";
2
+ @use "../common/variables";
3
+
1
4
  // —————————————————————————————————————————————————————————————————
2
5
  // elements
3
6
  // disabled
@@ -20,15 +23,15 @@ $spacing-switch: 1rem;
20
23
  opacity: 0;
21
24
 
22
25
  &:focus + .switch_switch {
23
- outline: 2px solid $primary;
26
+ outline: 2px solid variables.$primary;
24
27
  }
25
28
 
26
29
  &:checked + .switch_switch {
27
- background-color: $primary-light;
30
+ background-color: variables.$primary-light;
28
31
 
29
32
  .switch_toggle {
30
- @include calc(left, '100% -'($spacing-switch));
31
- background-color: $primary;
33
+ @include mixins.calc(left, '100% -'($spacing-switch));
34
+ background-color: variables.$primary;
32
35
  }
33
36
  }
34
37
  }
@@ -46,8 +49,8 @@ $spacing-switch: 1rem;
46
49
  cursor: pointer;
47
50
  width: $spacing-switch*2;
48
51
  height: $spacing-switch;
49
- background: $input-background;
50
- border: $border;
52
+ background: variables.$input-background;
53
+ border: variables.$border;
51
54
  border-radius: $spacing-switch;
52
55
  position: relative;
53
56
 
@@ -56,11 +59,11 @@ $spacing-switch: 1rem;
56
59
 
57
60
  &_toggle {
58
61
  position: absolute;
59
- left: -$spacing-xs;
62
+ left: -(variables.$spacing-xs);
60
63
  width: $spacing-switch*1.25;
61
64
  height: $spacing-switch*1.25;
62
65
  border-radius: $spacing-switch*1.25;
63
- background: $grey-50;
66
+ background: variables.$grey-50;
64
67
  }
65
68
  }
66
69
 
@@ -1,3 +1,6 @@
1
+ @use "../common/variables";
2
+ @use "../utilities/text";
3
+
1
4
  // —————————————————————————————————————————————————————————————————
2
5
  // elements
3
6
  // active
@@ -15,15 +18,15 @@
15
18
  &__controls {
16
19
  display: flex;
17
20
  width: 100%;
18
- border-bottom: $border;
21
+ border-bottom: variables.$border;
19
22
  }
20
23
 
21
24
  &__item {
22
25
  position: relative;
23
26
  cursor: pointer;
24
- padding: $spacing-sm $spacing-md;
25
- border-top-left-radius: $border-radius-sm;
26
- border-top-right-radius: $border-radius-sm;
27
+ padding: variables.$spacing-sm variables.$spacing-md;
28
+ border-top-left-radius: variables.$border-radius-sm;
29
+ border-top-right-radius: variables.$border-radius-sm;
27
30
 
28
31
  &:after {
29
32
  content: '';
@@ -36,7 +39,7 @@
36
39
  }
37
40
 
38
41
  &__panel {
39
- padding: $spacing-md;
42
+ padding: variables.$spacing-md;
40
43
  }
41
44
  }
42
45
 
@@ -46,14 +49,14 @@
46
49
 
47
50
  .tabs__item:hover,
48
51
  .tabs__item--active {
49
- background-color: $hover;
52
+ background-color: variables.$hover;
50
53
  }
51
54
 
52
55
  .tabs__item--active {
53
- color: $primary;
56
+ color: variables.$primary;
54
57
 
55
58
  &:after {
56
- background-color: $primary;
59
+ background-color: variables.$primary;
57
60
  }
58
61
  }
59
62
 
@@ -70,14 +73,14 @@
70
73
  flex-direction: column;
71
74
  width: 160px;
72
75
  border-bottom: 0;
73
- border-right: $border;
76
+ border-right: variables.$border;
74
77
  }
75
78
 
76
79
  &__item {
77
80
  text-align: left;
78
- border-top-left-radius: $border-radius-sm;
81
+ border-top-left-radius: variables.$border-radius-sm;
79
82
  border-top-right-radius: 0;
80
- border-bottom-left-radius: $border-radius-sm;
83
+ border-bottom-left-radius: variables.$border-radius-sm;
81
84
 
82
85
  &:after {
83
86
  top: 0;
@@ -89,8 +92,8 @@
89
92
  }
90
93
 
91
94
  &__panel {
92
- padding-top: $spacing-sm;
93
- padding-bottom: $spacing-sm;
95
+ padding-top: variables.$spacing-sm;
96
+ padding-bottom: variables.$spacing-sm;
94
97
  }
95
98
  }
96
99
  }
@@ -105,11 +108,11 @@
105
108
 
106
109
  &__item {
107
110
  @extend %caption;
108
- padding: $spacing-xs $spacing-sm;
111
+ padding: variables.$spacing-xs variables.$spacing-sm;
109
112
  }
110
113
 
111
114
  &__panel {
112
- padding: $spacing-sm;
115
+ padding: variables.$spacing-sm;
113
116
  }
114
117
  }
115
118
  }
@@ -1,3 +1,7 @@
1
+ @use "sass:list";
2
+ @use "../common/variables";
3
+ @use "../utilities/text";
4
+
1
5
  // —————————————————————————————————————————————————————————————————
2
6
  // elements
3
7
  // color
@@ -31,8 +35,8 @@
31
35
  display: inline-flex;
32
36
  align-items: center;
33
37
  justify-content: center;
34
- font-weight: $font-bold;
35
- border-radius: $border-radius-sm;
38
+ font-weight: variables.$font-bold;
39
+ border-radius: variables.$border-radius-sm;
36
40
  white-space: nowrap; // prevent text to go on multiple lines
37
41
  height: 1.5rem;
38
42
  width: fit-content;
@@ -48,21 +52,21 @@
48
52
  @mixin color($prefix, $colors...) {
49
53
 
50
54
  @each $i in $colors {
51
- .#{$prefix}#{nth($i, 1)} {
52
- background-color: nth($i, 2);
53
- color: nth($i, 3);
55
+ .#{$prefix}#{list.nth($i, 1)} {
56
+ background-color: list.nth($i, 2);
57
+ color: list.nth($i, 3);
54
58
  }
55
59
  }
56
60
  }
57
61
 
58
62
  @include color('tag',
59
- '' $primary $primary-contrast,
60
- '-secondary' $secondary $secondary-contrast,
61
- '-grey' $text-disabled $text,
62
- '-success' $success $success-contrast,
63
- '-info' $info $info-contrast,
64
- '-warning' $warning $warning-contrast,
65
- '-error' $error $error-contrast
63
+ '' variables.$primary variables.$primary-contrast,
64
+ '-secondary' variables.$secondary variables.$secondary-contrast,
65
+ '-grey' variables.$text-disabled variables.$text,
66
+ '-success' variables.$success variables.$success-contrast,
67
+ '-info' variables.$info variables.$info-contrast,
68
+ '-warning' variables.$warning variables.$warning-contrast,
69
+ '-error' variables.$error variables.$error-contrast
66
70
  );
67
71
 
68
72
  // —————————————————————————————————————————————————————————————————