@papillonbits/css 1.0.0 → 1.2.1

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 (37) hide show
  1. package/LICENSE +1 -1
  2. package/build/primer/base/base.scss +8 -13
  3. package/build/primer/base/index.scss +1 -0
  4. package/build/primer/base/kbd.scss +8 -6
  5. package/build/primer/{color-modes/native.scss → base/native-colors.scss} +4 -2
  6. package/build/primer/base/normalize.scss +4 -3
  7. package/build/primer/base/typography-base.scss +4 -0
  8. package/build/primer/color-modes/index.scss +0 -1
  9. package/build/primer/color-modes/themes/dark.scss +1 -6
  10. package/build/primer/color-modes/themes/dark_colorblind.scss +1 -6
  11. package/build/primer/color-modes/themes/dark_dimmed.scss +1 -6
  12. package/build/primer/color-modes/themes/dark_high_contrast.scss +1 -6
  13. package/build/primer/color-modes/themes/dark_tritanopia.scss +1 -6
  14. package/build/primer/color-modes/themes/light.scss +1 -6
  15. package/build/primer/color-modes/themes/light_colorblind.scss +1 -6
  16. package/build/primer/color-modes/themes/light_high_contrast.scss +1 -6
  17. package/build/primer/color-modes/themes/light_tritanopia.scss +1 -6
  18. package/build/primer/index.scss +1 -1
  19. package/build/primer/primitives/index.scss +21 -0
  20. package/build/primer/support/mixins/color-modes.scss +89 -3
  21. package/build/primer/support/mixins/layout.scss +0 -1
  22. package/build/primer/support/mixins/misc.scss +13 -9
  23. package/build/primer/support/mixins/typography.scss +21 -0
  24. package/build/primer/support/variables/misc.scss +2 -2
  25. package/build/primer/support/variables/typography.scss +1 -1
  26. package/build/primer/truncate/truncate.scss +2 -66
  27. package/build/primer/utilities/borders.scss +18 -18
  28. package/build/primer/utilities/box-shadow.scss +8 -4
  29. package/build/primer/utilities/colors.scss +61 -61
  30. package/build/primer/utilities/details.scss +1 -1
  31. package/build/primer/utilities/flexbox.scss +0 -1
  32. package/build/primer/utilities/layout.scss +7 -5
  33. package/build/primer/utilities/margin.scss +0 -2
  34. package/build/primer/utilities/padding.scss +6 -7
  35. package/build/primer/utilities/typography.scss +9 -9
  36. package/build/primer/utilities/visibility-display.scss +10 -9
  37. package/package.json +2 -2
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2023 MTS.
3
+ Copyright (c) 2024 MTS.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -2,7 +2,7 @@
2
2
  @import "../support/variables/typography.scss";
3
3
  @import "../support/variables/misc.scss";
4
4
 
5
- // stylelint-disable selector-max-type, selector-no-qualifying-type
5
+ // stylelint-disable selector-max-type, selector-no-qualifying-type, primer/typography
6
6
  * {
7
7
  box-sizing: border-box;
8
8
  }
@@ -20,12 +20,12 @@ body {
20
20
  font-family: $body-font;
21
21
  font-size: var(--body-font-size, $body-font-size);
22
22
  line-height: $body-line-height;
23
- color: var(--color-fg-default);
24
- background-color: var(--color-canvas-default);
23
+ color: var(--fgColor-default, var(--color-fg-default));
24
+ background-color: var(--bgColor-default, var(--color-canvas-default));
25
25
  }
26
26
 
27
27
  a {
28
- color: var(--color-accent-fg);
28
+ color: var(--fgColor-accent, var(--color-accent-fg));
29
29
  text-decoration: none;
30
30
 
31
31
  &:hover {
@@ -50,7 +50,7 @@ label {
50
50
 
51
51
  // Custom styling for HTML5 validation bubbles (WebKit only)
52
52
  ::placeholder {
53
- color: var(--color-fg-subtle);
53
+ color: var(--fgColor-muted, var(--color-fg-subtle));
54
54
  opacity: 1; // override opacity in normalize.css
55
55
  }
56
56
 
@@ -65,7 +65,8 @@ hr,
65
65
  overflow: hidden;
66
66
  background: transparent;
67
67
  border: 0;
68
- border-bottom: $border-width $border-style var(--color-border-muted);
68
+ // stylelint-disable-next-line primer/borders
69
+ border-bottom: $border-width $border-style var(--borderColor-muted, var(--color-border-muted));
69
70
 
70
71
  @include clearfix();
71
72
  }
@@ -76,6 +77,7 @@ hr,
76
77
 
77
78
  table {
78
79
  border-spacing: 0;
80
+ // stylelint-disable-next-line primer/borders
79
81
  border-collapse: collapse;
80
82
  }
81
83
 
@@ -100,13 +102,6 @@ details {
100
102
  summary {
101
103
  cursor: pointer;
102
104
  }
103
-
104
- &:not([open]) {
105
- // Set details content hidden by default for browsers that don't do this
106
- > *:not(summary) {
107
- display: none !important;
108
- }
109
- }
110
105
  }
111
106
 
112
107
  // global focus styles
@@ -1,4 +1,5 @@
1
1
  @import '../support/index.scss';
2
+ @import './native-colors.scss';
2
3
  @import './normalize.scss';
3
4
  @import './base.scss';
4
5
  @import './kbd.scss';
@@ -7,17 +7,19 @@
7
7
 
8
8
  kbd {
9
9
  display: inline-block;
10
- padding: ($spacer-1 - 1) ($spacer-1 + 1);
10
+ padding: var(--base-size-4);
11
+ // stylelint-disable-next-line primer/typography
11
12
  font: 11px $mono-font;
12
13
  // stylelint-disable-next-line primer/typography
13
14
  line-height: 10px;
14
- color: var(--color-fg-default);
15
+ color: var(--fgColor-default, var(--color-fg-default));
15
16
  vertical-align: middle;
16
- background-color: var(--color-canvas-subtle);
17
+ background-color: var(--bgColor-muted, var(--color-canvas-subtle));
18
+ // stylelint-disable-next-line primer/borders
19
+ border: $border-style $border-width var(--borderColor-neutral-muted, var(--color-neutral-muted));
20
+ border-bottom-color: var(--borderColor-neutral-muted, var(--color-neutral-muted));
17
21
  // stylelint-disable-next-line primer/borders
18
- border: $border-style $border-width var(--color-neutral-muted);
19
- border-bottom-color: var(--color-neutral-muted);
20
22
  border-radius: $border-radius;
21
23
  // stylelint-disable-next-line primer/box-shadow
22
- box-shadow: inset 0 -1px 0 var(--color-neutral-muted);
24
+ box-shadow: inset 0 -1px 0 var(--borderColor-neutral-muted, var(--color-neutral-muted));
23
25
  }
@@ -6,8 +6,8 @@
6
6
  @include color-mode(dark) { color-scheme: dark; }
7
7
 
8
8
  [data-color-mode] {
9
- color: var(--color-fg-default);
10
- background-color: var(--color-canvas-default);
9
+ color: var(--fgColor-default, var(--color-fg-default));
10
+ background-color: var(--bgColor-default, var(--color-canvas-default));
11
11
  }
12
12
 
13
13
  // Windows High Contrast mode
@@ -18,5 +18,7 @@
18
18
  body {
19
19
  --color-accent-emphasis: Highlight;
20
20
  --color-fg-on-emphasis: LinkText;
21
+ --fgColor-onEmphasis: LinkText;
22
+ --fgColor-accent: Highlight;
21
23
  }
22
24
  }
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  html {
10
+ font-size: 16px; /* this can be removed when all of GitHub uses rem units */
10
11
  font-family: sans-serif; /* 1 */
11
12
  -ms-text-size-adjust: 100%; /* 2 */
12
13
  -webkit-text-size-adjust: 100%; /* 2 */
@@ -152,8 +153,8 @@ h1 {
152
153
  */
153
154
 
154
155
  mark {
155
- background-color: var(--color-attention-subtle);
156
- color: var(--color-fg-default);
156
+ background-color: var(--bgColor-attention-muted, var(--color-attention-subtle));
157
+ color: var(--fgColor-default, var(--color-fg-default));
157
158
  }
158
159
 
159
160
  /**
@@ -225,7 +226,7 @@ samp {
225
226
  */
226
227
 
227
228
  figure {
228
- margin: 1em $spacer-6;
229
+ margin: 1em var(--base-size-40);
229
230
  }
230
231
 
231
232
  /**
@@ -71,14 +71,18 @@ dd {
71
71
  tt,
72
72
  code,
73
73
  samp {
74
+ // stylelint-disable-next-line primer/typography
74
75
  font-family: $mono-font;
76
+ // stylelint-disable-next-line primer/typography
75
77
  font-size: $font-size-small;
76
78
  }
77
79
 
78
80
  pre {
79
81
  margin-top: 0;
80
82
  margin-bottom: 0;
83
+ // stylelint-disable-next-line primer/typography
81
84
  font-family: $mono-font;
85
+ // stylelint-disable-next-line primer/typography
82
86
  font-size: $font-size-small;
83
87
  }
84
88
 
@@ -9,4 +9,3 @@
9
9
  @import './themes/dark_high_contrast.scss';
10
10
  @import './themes/dark_colorblind.scss';
11
11
  @import './themes/dark_tritanopia.scss';
12
- @import './native.scss';
@@ -1,6 +1 @@
1
- @import '~@primer/primitives/dist/scss/colors/_dark.scss';
2
- @import '../../support/mixins/color-modes.scss';
3
-
4
- @include color-mode-theme(dark) {
5
- @include primer-colors-dark;
6
- }
1
+ @import '~@primer/primitives/dist/internalCss/dark.css';
@@ -1,6 +1 @@
1
- @import '~@primer/primitives/dist/scss/colors/_dark_colorblind.scss';
2
- @import '../../support/mixins/color-modes.scss';
3
-
4
- @include color-mode-theme(dark_colorblind) {
5
- @include primer-colors-dark_colorblind;
6
- }
1
+ @import '~@primer/primitives/dist/internalCss/dark-colorblind.css';
@@ -1,6 +1 @@
1
- @import '~@primer/primitives/dist/scss/colors/_dark_dimmed.scss';
2
- @import '../../support/mixins/color-modes.scss';
3
-
4
- @include color-mode-theme(dark_dimmed) {
5
- @include primer-colors-dark_dimmed;
6
- }
1
+ @import '~@primer/primitives/dist/internalCss/dark-dimmed.css';
@@ -1,6 +1 @@
1
- @import '~@primer/primitives/dist/scss/colors/_dark_high_contrast.scss';
2
- @import '../../support/mixins/color-modes.scss';
3
-
4
- @include color-mode-theme(dark_high_contrast) {
5
- @include primer-colors-dark_high_contrast;
6
- }
1
+ @import '~@primer/primitives/dist/internalCss/dark-high-contrast.css';
@@ -1,6 +1 @@
1
- @import '~@primer/primitives/dist/scss/colors/_dark_tritanopia.scss';
2
- @import '../../support/mixins/color-modes.scss';
3
-
4
- @include color-mode-theme(dark_tritanopia) {
5
- @include primer-colors-dark_tritanopia;
6
- }
1
+ @import '~@primer/primitives/dist/internalCss/dark-tritanopia.css';
@@ -1,6 +1 @@
1
- @import '~@primer/primitives/dist/scss/colors/_light.scss';
2
- @import '../../support/mixins/color-modes.scss';
3
-
4
- @include color-mode-theme(light, true) {
5
- @include primer-colors-light;
6
- }
1
+ @import '~@primer/primitives/dist/internalCss/light.css';
@@ -1,6 +1 @@
1
- @import '~@primer/primitives/dist/scss/colors/_light_colorblind.scss';
2
- @import '../../support/mixins/color-modes.scss';
3
-
4
- @include color-mode-theme(light_colorblind) {
5
- @include primer-colors-light_colorblind;
6
- }
1
+ @import '~@primer/primitives/dist/internalCss/light-colorblind.css';
@@ -1,6 +1 @@
1
- @import '~@primer/primitives/dist/scss/colors/_light_high_contrast.scss';
2
- @import '../../support/mixins/color-modes.scss';
3
-
4
- @include color-mode-theme(light_high_contrast) {
5
- @include primer-colors-light_high_contrast;
6
- }
1
+ @import '~@primer/primitives/dist/internalCss/light-high-contrast.css';
@@ -1,6 +1 @@
1
- @import '~@primer/primitives/dist/scss/colors/_light_tritanopia.scss';
2
- @import '../../support/mixins/color-modes.scss';
3
-
4
- @include color-mode-theme(light_tritanopia) {
5
- @include primer-colors-light_tritanopia;
6
- }
1
+ @import '~@primer/primitives/dist/internalCss/light-tritanopia.css';
@@ -1,6 +1,6 @@
1
1
  @import './color-modes/index.scss';
2
+ @import './primitives/index.scss';
2
3
  @import './support/index.scss';
3
4
  @import './base/index.scss';
4
5
  @import './truncate/index.scss';
5
6
  @import './utilities/index.scss';
6
-
@@ -0,0 +1,21 @@
1
+ // https://github.com/primer/primitives
2
+
3
+ /* size/typography */
4
+ @import '@primer/primitives/dist/css/base/size/size.css';
5
+ @import '@primer/primitives/dist/css/base/typography/typography.css';
6
+ @import '@primer/primitives/dist/css/functional/size/border.css';
7
+ @import '@primer/primitives/dist/css/functional/size/breakpoints.css';
8
+ @import '@primer/primitives/dist/css/functional/size/size.css';
9
+ @import '@primer/primitives/dist/css/functional/size/viewport.css';
10
+ @import '@primer/primitives/dist/css/functional/typography/typography.css';
11
+
12
+ /* color */
13
+ @import '@primer/primitives/dist/css/functional/themes/light.css';
14
+ @import '@primer/primitives/dist/css/functional/themes/light-tritanopia.css';
15
+ @import '@primer/primitives/dist/css/functional/themes/light-high-contrast.css';
16
+ @import '@primer/primitives/dist/css/functional/themes/light-colorblind.css';
17
+ @import '@primer/primitives/dist/css/functional/themes/dark.css';
18
+ @import '@primer/primitives/dist/css/functional/themes/dark-colorblind.css';
19
+ @import '@primer/primitives/dist/css/functional/themes/dark-dimmed.css';
20
+ @import '@primer/primitives/dist/css/functional/themes/dark-high-contrast.css';
21
+ @import '@primer/primitives/dist/css/functional/themes/dark-tritanopia.css';
@@ -1,34 +1,122 @@
1
+ // This mixin is used to output the tokens/variables from Primitives
2
+ //
3
+ // Example:
4
+ //
5
+ // @include color-mode-theme(dark) {
6
+ // --color: black;
7
+ // }
8
+ //
9
+ // Warning!!!
10
+ // Don't use this mixin with a class. E.g.
11
+ // @include color-mode-theme(dark) {
12
+ // .my-class {
13
+ // color: red;
14
+ // }
15
+ // }
16
+ //
17
+ // The outputted `::selection .my-class` will make the selector invalid and the entire ruleset is disregarded.
18
+ // At some point we hopefully can remove the need for `&, &::selection {}` again (once the spec/implementation changes).
19
+
1
20
  @mixin color-mode-theme($theme-name, $include-root: false) {
2
21
  @if $include-root {
3
22
  :root,
4
23
  [data-color-mode="light"][data-light-theme="#{$theme-name}"],
5
24
  [data-color-mode="dark"][data-dark-theme="#{$theme-name}"] {
6
- @content;
25
+ &,
26
+ &::selection {
27
+ @content;
28
+ }
7
29
 
8
30
  /*! */ // This is a fix for a cssstats bug see https://github.com/cssstats/cssstats/issues/331
9
31
  }
32
+
33
+ ::backdrop,
34
+ [data-color-mode="light"][data-light-theme="#{$theme-name}"] ::backdrop,
35
+ [data-color-mode="dark"][data-dark-theme="#{$theme-name}"] ::backdrop {
36
+ @content;
37
+
38
+ /*! */ // Must remain separate from the above selector to not break browsers which don't support ::backdrop, e.g. Safari 14.
39
+ }
10
40
  }
11
41
 
12
42
  @else {
13
43
  [data-color-mode="light"][data-light-theme="#{$theme-name}"],
14
44
  [data-color-mode="dark"][data-dark-theme="#{$theme-name}"] {
45
+ &,
46
+ &::selection {
47
+ @content;
48
+ }
49
+ }
50
+
51
+ ::backdrop,
52
+ [data-color-mode="light"][data-light-theme="#{$theme-name}"] ::backdrop,
53
+ [data-color-mode="dark"][data-dark-theme="#{$theme-name}"] ::backdrop {
15
54
  @content;
55
+
56
+ /*! */ // Must remain separate from the above selector to not break browsers which don't support ::backdrop, e.g. Safari 14.
16
57
  }
17
58
  }
18
59
 
19
60
  @media (prefers-color-scheme: light) {
20
61
  [data-color-mode="auto"][data-light-theme="#{$theme-name}"] {
62
+ &,
63
+ &::selection {
64
+ @content;
65
+ }
66
+ }
67
+
68
+ [data-color-mode="auto"][data-light-theme="#{$theme-name}"] ::backdrop {
21
69
  @content;
70
+
71
+ /*! */ // Must remain separate from the above selector to not break browsers which don't support ::backdrop, e.g. Safari 14.
22
72
  }
23
73
  }
24
74
 
25
75
  @media (prefers-color-scheme: dark) {
26
76
  [data-color-mode="auto"][data-dark-theme="#{$theme-name}"] {
77
+ &,
78
+ &::selection {
79
+ @content;
80
+ }
81
+ }
82
+
83
+ [data-color-mode="auto"][data-light-theme="#{$theme-name}"] ::backdrop {
27
84
  @content;
85
+
86
+ /*! */ // Must remain separate from the above selector to not break browsers which don't support ::backdrop, e.g. Safari 14.
28
87
  }
29
88
  }
30
89
  }
31
90
 
91
+ // This mixin wraps styles with light or dark mode selectors
92
+ // If possible, use a color variable instead.
93
+ //
94
+ // Example:
95
+ //
96
+ // @include color-mode('dark') {
97
+ // .my-class {
98
+ // color: red;
99
+ // }
100
+ // }
101
+ //
102
+ // Returns:
103
+ //
104
+ // [data-color-mode=light][data-light-theme*=dark] .my-class,
105
+ // [data-color-mode=dark][data-dark-theme*=dark] .my-class {
106
+ // color: red;
107
+ // }
108
+ //
109
+ // @media (prefers-color-scheme: light) {
110
+ // [data-color-mode=auto][data-light-theme*=dark] .my-class {
111
+ // color: red;
112
+ // }
113
+ // }
114
+ // @media (prefers-color-scheme: dark) {
115
+ // [data-color-mode=auto][data-dark-theme*=dark] .my-class {
116
+ // color: red;
117
+ // }
118
+ // }
119
+
32
120
  @mixin color-mode($mode) {
33
121
  @if $mode == light {
34
122
  :root,
@@ -84,12 +172,10 @@
84
172
  @each $name, $value in $color-map {
85
173
  @each $type, $color in $value {
86
174
  @if $type == dark {
87
- // stylelint-disable-next-line function-no-unknown
88
175
  $dark-colors: append($dark-colors, (--color-#{$name}, #{$color}));
89
176
  }
90
177
 
91
178
  @else {
92
- // stylelint-disable-next-line function-no-unknown
93
179
  $light-colors: append($light-colors, (--color-#{$name}, #{$color}));
94
180
  }
95
181
  }
@@ -9,7 +9,6 @@
9
9
 
10
10
  @else {
11
11
  // Retrieves the value from the key
12
- // stylelint-disable-next-line function-no-unknown
13
12
  $value: map-get($breakpoints, $breakpoint);
14
13
 
15
14
  // If the key exists in the map
@@ -1,11 +1,12 @@
1
1
  // Generate a two-color caret for any element.
2
- @mixin double-caret($background: var(--color-canvas-default), $border: var(--color-border-default)) {
2
+ @mixin double-caret($background: var(--bgColor-default, var(--color-canvas-default)), $border: var(--borderColor-default, var(--color-border-default))) {
3
3
  &::after,
4
4
  &::before {
5
5
  position: absolute;
6
+ // stylelint-disable-next-line primer/spacing
6
7
  top: 11px;
7
8
  right: 100%;
8
- left: -8px;
9
+ left: calc(var(--base-size-8) * -1);
9
10
  display: block;
10
11
  width: 8px;
11
12
  height: 16px;
@@ -17,7 +18,7 @@
17
18
  &::after {
18
19
  // stylelint-disable-next-line primer/spacing
19
20
  margin-left: 2px;
20
- background-color: var(--color-canvas-default);
21
+ background-color: var(--bgColor-default, var(--color-canvas-default));
21
22
  background-image: linear-gradient($background, $background);
22
23
  }
23
24
 
@@ -29,31 +30,34 @@
29
30
  // global focus styles
30
31
 
31
32
  // inset box-shadow for form controls
32
- @mixin focusBoxShadowInset($outlineWidth: 1px, $outlineColor: var(--color-accent-fg)) {
33
- border-color: var(--color-accent-fg);
33
+ @mixin focusBoxShadowInset($outlineWidth: 1px, $outlineColor: var(--focus-outlineColor, var(--color-accent-fg))) {
34
+ border-color: var(--focus-outlineColor, var(--color-accent-fg));
34
35
  outline: none;
36
+ // stylelint-disable-next-line primer/box-shadow
35
37
  box-shadow: inset 0 0 0 $outlineWidth $outlineColor;
36
38
  }
37
39
 
38
40
  // box-shadow for :target styles (no inset)
39
41
  // !important to override PCSS utilities
40
- @mixin targetBoxShadow($outlineWidth: 2px, $outlineColor: var(--color-accent-fg)) {
42
+ @mixin targetBoxShadow($outlineWidth: 2px, $outlineColor: var(--focus-outlineColor, var(--color-accent-fg))) {
41
43
  outline: none !important;
44
+ // stylelint-disable-next-line primer/box-shadow
42
45
  box-shadow: 0 0 0 $outlineWidth $outlineColor !important;
43
46
  }
44
47
 
45
48
  // outline
46
- @mixin focusOutline($outlineOffset: -2px, $outlineColor: var(--color-accent-fg)) {
49
+ @mixin focusOutline($outlineOffset: -2px, $outlineColor: var(--focus-outlineColor, var(--color-accent-fg))) {
47
50
  outline: 2px solid $outlineColor;
48
51
  outline-offset: $outlineOffset;
49
52
  box-shadow: none;
50
53
  }
51
54
 
52
55
  // outline with fg box-shadow for buttons
53
- @mixin focusOutlineOnEmphasis($outlineOffset: -2px, $outlineColor: var(--color-accent-fg)) {
56
+ @mixin focusOutlineOnEmphasis($outlineOffset: -2px, $outlineColor: var(--focus-outlineColor, var(--color-accent-fg))) {
54
57
  outline: 2px solid $outlineColor;
55
58
  outline-offset: $outlineOffset;
56
- box-shadow: inset 0 0 0 3px var(--color-fg-on-emphasis);
59
+ // stylelint-disable-next-line primer/box-shadow
60
+ box-shadow: inset 0 0 0 3px var(--fgColor-onEmphasis, var(--color-fg-on-emphasis));
57
61
  }
58
62
 
59
63
  // if min-width is undefined, return only min-height
@@ -12,32 +12,44 @@
12
12
  // Heading mixins for use within components
13
13
  // These match heading utilities in utilities/typography
14
14
  @mixin h1 {
15
+ // stylelint-disable-next-line primer/typography
15
16
  font-size: var(--h1-size, $h1-size);
17
+ // stylelint-disable-next-line primer/typography
16
18
  font-weight: $font-weight-bold;
17
19
  }
18
20
 
19
21
  @mixin h2 {
22
+ // stylelint-disable-next-line primer/typography
20
23
  font-size: var(--h2-size, $h2-size);
24
+ // stylelint-disable-next-line primer/typography
21
25
  font-weight: $font-weight-bold;
22
26
  }
23
27
 
24
28
  @mixin h3 {
29
+ // stylelint-disable-next-line primer/typography
25
30
  font-size: var(--h3-size, $h3-size);
31
+ // stylelint-disable-next-line primer/typography
26
32
  font-weight: $font-weight-bold;
27
33
  }
28
34
 
29
35
  @mixin h4 {
36
+ // stylelint-disable-next-line primer/typography
30
37
  font-size: var(--h4-size, $h4-size);
38
+ // stylelint-disable-next-line primer/typography
31
39
  font-weight: $font-weight-bold;
32
40
  }
33
41
 
34
42
  @mixin h5 {
43
+ // stylelint-disable-next-line primer/typography
35
44
  font-size: var(--h5-size, $h5-size);
45
+ // stylelint-disable-next-line primer/typography
36
46
  font-weight: $font-weight-bold;
37
47
  }
38
48
 
39
49
  @mixin h6 {
50
+ // stylelint-disable-next-line primer/typography
40
51
  font-size: var(--h6-size, $h6-size);
52
+ // stylelint-disable-next-line primer/typography
41
53
  font-weight: $font-weight-bold;
42
54
  }
43
55
 
@@ -45,28 +57,34 @@
45
57
  // There are no responsive mixins for h4-h6 because they are small
46
58
  // and don't need to be smaller on mobile.
47
59
  @mixin f1-responsive {
60
+ // stylelint-disable-next-line primer/typography
48
61
  font-size: var(--h1-size-mobile, $h1-size-mobile);
49
62
 
50
63
  // 32px on desktop
51
64
  @include breakpoint(md) {
65
+ // stylelint-disable-next-line primer/typography
52
66
  font-size: var(--h1-size, $h1-size);
53
67
  }
54
68
  }
55
69
 
56
70
  @mixin f2-responsive {
71
+ // stylelint-disable-next-line primer/typography
57
72
  font-size: var(--h2-size-mobile, $h2-size-mobile);
58
73
 
59
74
  // 24px on desktop
60
75
  @include breakpoint(md) {
76
+ // stylelint-disable-next-line primer/typography
61
77
  font-size: var(--h2-size, $h2-size);
62
78
  }
63
79
  }
64
80
 
65
81
  @mixin f3-responsive {
82
+ // stylelint-disable-next-line primer/typography
66
83
  font-size: var(--h3-size-mobile, $h3-size-mobile);
67
84
 
68
85
  // 20px on desktop
69
86
  @include breakpoint(md) {
87
+ // stylelint-disable-next-line primer/typography
70
88
  font-size: var(--h3-size, $h3-size);
71
89
  }
72
90
  }
@@ -77,17 +95,20 @@
77
95
  @mixin h1-responsive {
78
96
  @include f1-responsive;
79
97
 
98
+ // stylelint-disable-next-line primer/typography
80
99
  font-weight: $font-weight-bold;
81
100
  }
82
101
 
83
102
  @mixin h2-responsive {
84
103
  @include f2-responsive;
85
104
 
105
+ // stylelint-disable-next-line primer/typography
86
106
  font-weight: $font-weight-bold;
87
107
  }
88
108
 
89
109
  @mixin h3-responsive {
90
110
  @include f3-responsive;
91
111
 
112
+ // stylelint-disable-next-line primer/typography
92
113
  font-weight: $font-weight-bold;
93
114
  }
@@ -3,8 +3,8 @@
3
3
  // Border
4
4
  $border-width: 1px !default;
5
5
  $border-style: solid !default;
6
- $border: $border-width $border-style var(--color-border-default) !default;
7
- $border-rem: var(--primer-borderWidth-thin, 1px) solid var(--color-border-default) !default;
6
+ $border: $border-width $border-style var(--borderColor-default, var(--color-border-default)) !default;
7
+ $border-rem: var(--borderWidth-thin, 1px) solid var(--borderColor-default, var(--color-border-default)) !default;
8
8
 
9
9
  // Border Radius
10
10
  $border-radius-1: 4px !default;
@@ -36,7 +36,7 @@ $body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetic
36
36
 
37
37
  // Monospace font stack
38
38
  // Note: SFMono-Regular needs to come before SF Mono to fix an older version of the font in Chrome
39
- $mono-font: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace !default;
39
+ $mono-font: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace) !default;
40
40
 
41
41
  // The base body size
42
42
  $body-font-size: 14px !default;
@@ -1,66 +1,2 @@
1
- // https://raw.githubusercontent.com/primer/view_components/main/app/components/primer/truncate.pcss
2
-
3
- /* CSS truncate */
4
-
5
- /* css-truncate will shorten text with an ellipsis. */
6
-
7
- .css-truncate {
8
- /* css-truncate-overflow will shorten text with an ellipsis when overflowing */
9
- &.css-truncate-overflow,
10
- & .css-truncate-overflow,
11
- &.css-truncate-target,
12
- & .css-truncate-target {
13
- overflow: hidden;
14
- text-overflow: ellipsis;
15
- white-space: nowrap;
16
- }
17
-
18
- /* css-truncate-target will shorten text with an ellipsis and a max width */
19
- &.css-truncate-target,
20
- & .css-truncate-target {
21
- display: inline-block;
22
- max-width: 125px;
23
- vertical-align: top;
24
- }
25
-
26
- &.expandable.zeroclipboard-is-hover .css-truncate-target,
27
- &.expandable.zeroclipboard-is-hover.css-truncate-target,
28
- &.expandable:hover .css-truncate-target,
29
- &.expandable:hover.css-truncate-target {
30
- max-width: 10000px !important;
31
- }
32
- }
33
-
34
- // https://raw.githubusercontent.com/primer/view_components/main/app/components/primer/beta/truncate.pcss
35
-
36
- // /* Truncate */
37
-
38
- .Truncate {
39
- display: inline-flex;
40
- min-width: 0;
41
- max-width: 100%;
42
-
43
- & > .Truncate-text {
44
- min-width: 1ch;
45
- max-width: fit-content;
46
- overflow: hidden;
47
- text-overflow: ellipsis;
48
- white-space: nowrap;
49
-
50
- & + .Truncate-text {
51
- margin-left: var(--primer-control-small-gap, 4px);
52
- }
53
-
54
- &.Truncate-text--primary {
55
- flex-basis: 200%;
56
- }
57
-
58
- &.Truncate-text--expandable:hover,
59
- &.Truncate-text--expandable:focus,
60
- &.Truncate-text--expandable:active {
61
- max-width: 100% !important;
62
- flex-shrink: 0;
63
- cursor: pointer;
64
- }
65
- }
66
- }
1
+ @import '@primer/view-components/app/components/primer/truncate';
2
+ @import '@primer/view-components/app/components/primer/beta/truncate';
@@ -3,31 +3,31 @@
3
3
  @import "../support/mixins/layout.scss";
4
4
 
5
5
  // Core border utilities
6
- // stylelint-disable block-opening-brace-space-before
6
+ // stylelint-disable primer/borders
7
7
 
8
8
  /* Add a gray border to the left and right */
9
9
  .border-x {
10
- border-right: $border !important;
11
- border-left: $border !important;
10
+ border-right: $border-rem !important;
11
+ border-left: $border-rem !important;
12
12
  }
13
13
 
14
14
  /* Add a gray border to the top and bottom */
15
15
  .border-y {
16
- border-top: $border !important;
17
- border-bottom: $border !important;
16
+ border-top: $border-rem !important;
17
+ border-bottom: $border-rem !important;
18
18
  }
19
19
 
20
20
  /* Responsive gray borders */
21
21
  @each $breakpoint, $variant in $responsive-variants {
22
22
  @include breakpoint($breakpoint) {
23
23
  /* Add a gray border on all sides at/above this breakpoint */
24
- .border#{$variant} { border: $border !important; }
24
+ .border#{$variant} { border: $border-rem !important; }
25
25
  .border#{$variant}-0 { border: 0 !important; }
26
26
 
27
- .border#{$variant}-top { border-top: $border !important; }
28
- .border#{$variant}-right { border-right: $border !important; }
29
- .border#{$variant}-bottom { border-bottom: $border !important; }
30
- .border#{$variant}-left { border-left: $border !important; }
27
+ .border#{$variant}-top { border-top: $border-rem !important; }
28
+ .border#{$variant}-right { border-right: $border-rem !important; }
29
+ .border#{$variant}-bottom { border-bottom: $border-rem !important; }
30
+ .border#{$variant}-left { border-left: $border-rem !important; }
31
31
 
32
32
  .border#{$variant}-top-0 { border-top: 0 !important; }
33
33
  .border#{$variant}-right-0 { border-right: 0 !important; }
@@ -35,11 +35,11 @@
35
35
  .border#{$variant}-left-0 { border-left: 0 !important; }
36
36
 
37
37
  // Rounded corners
38
- .rounded#{$variant} { border-radius: var(--primer-borderRadius-medium, $border-radius-2) !important; }
38
+ .rounded#{$variant} { border-radius: var(--borderRadius-medium, $border-radius-2) !important; }
39
39
  .rounded#{$variant}-0 { border-radius: 0 !important; }
40
- .rounded#{$variant}-1 { border-radius: var(--primer-borderRadius-small, $border-radius-1) !important; }
41
- .rounded#{$variant}-2 { border-radius: var(--primer-borderRadius-medium, $border-radius-2) !important; }
42
- .rounded#{$variant}-3 { border-radius: var(--primer-borderRadius-large, $border-radius-3) !important; }
40
+ .rounded#{$variant}-1 { border-radius: var(--borderRadius-small, $border-radius-1) !important; }
41
+ .rounded#{$variant}-2 { border-radius: var(--borderRadius-medium, $border-radius-2) !important; }
42
+ .rounded#{$variant}-3 { border-radius: var(--borderRadius-large, $border-radius-3) !important; }
43
43
 
44
44
  @each $edge, $corners in $edges {
45
45
  .rounded#{$variant}-#{$edge}-0 {
@@ -50,19 +50,19 @@
50
50
 
51
51
  .rounded#{$variant}-#{$edge}-1 {
52
52
  @each $corner in $corners {
53
- border-#{$corner}-radius: var(--primer-borderRadius-small, $border-radius-1) !important;
53
+ border-#{$corner}-radius: var(--borderRadius-small, $border-radius-1) !important;
54
54
  }
55
55
  }
56
56
 
57
57
  .rounded#{$variant}-#{$edge}-2 {
58
58
  @each $corner in $corners {
59
- border-#{$corner}-radius: var(--primer-borderRadius-medium, $border-radius-2) !important;
59
+ border-#{$corner}-radius: var(--borderRadius-medium, $border-radius-2) !important;
60
60
  }
61
61
  }
62
62
 
63
63
  .rounded#{$variant}-#{$edge}-3 {
64
64
  @each $corner in $corners {
65
- border-#{$corner}-radius: var(--primer-borderRadius-medium, $border-radius-3) !important;
65
+ border-#{$corner}-radius: var(--borderRadius-medium, $border-radius-3) !important;
66
66
  }
67
67
  }
68
68
  }
@@ -70,7 +70,7 @@
70
70
  }
71
71
 
72
72
  /* Add a 50% border-radius to make something into a circle */
73
- .circle { border-radius: var(--primer-borderRadius-full, 50%) !important; }
73
+ .circle { border-radius: var(--borderRadius-full, 50%) !important; }
74
74
 
75
75
  /* Change the border style to dashed, in conjunction with another utility */
76
76
  .border-dashed {
@@ -5,19 +5,23 @@
5
5
  // Box shadows
6
6
 
7
7
  .color-shadow-small {
8
- box-shadow: var(--color-shadow-small) !important;
8
+ box-shadow: var(--shadow-resting-small, var(--color-shadow-small)) !important;
9
9
  }
10
10
 
11
11
  .color-shadow-medium {
12
- box-shadow: var(--color-shadow-medium) !important;
12
+ box-shadow: var(--shadow-resting-medium, var(--color-shadow-medium)) !important;
13
13
  }
14
14
 
15
15
  .color-shadow-large {
16
- box-shadow: var(--color-shadow-large) !important;
16
+ box-shadow: var(--shadow-floating-large, var(--color-shadow-large)) !important;
17
17
  }
18
18
 
19
19
  .color-shadow-extra-large {
20
- box-shadow: var(--color-shadow-extra-large) !important;
20
+ box-shadow: var(--shadow-floating-xlarge, var(--color-shadow-extra-large)) !important;
21
+ }
22
+
23
+ .shadow-floating-small {
24
+ box-shadow: var(--shadow-floating-small, var(--color-overlay-shadow)) !important;
21
25
  }
22
26
 
23
27
  // Turn off box shadow
@@ -2,94 +2,94 @@
2
2
 
3
3
  // Foreground
4
4
 
5
- .color-fg-default { color: var(--color-fg-default) !important; }
6
- .color-fg-muted { color: var(--color-fg-muted) !important; }
7
- .color-fg-subtle { color: var(--color-fg-subtle) !important; }
8
-
9
- .color-fg-accent { color: var(--color-accent-fg) !important; }
10
- .color-fg-success { color: var(--color-success-fg) !important; }
11
- .color-fg-attention { color: var(--color-attention-fg) !important; }
12
- .color-fg-severe { color: var(--color-severe-fg) !important; }
13
- .color-fg-danger { color: var(--color-danger-fg) !important; }
14
- .color-fg-open { color: var(--color-open-fg) !important; }
15
- .color-fg-closed { color: var(--color-closed-fg) !important; }
16
- .color-fg-done { color: var(--color-done-fg) !important; }
17
- .color-fg-sponsors { color: var(--color-sponsors-fg) !important; }
18
-
19
- .color-fg-on-emphasis { color: var(--color-fg-on-emphasis) !important; }
5
+ .color-fg-default, .fgColor-default { color: var(--fgColor-default, var(--color-fg-default)) !important; }
6
+ .color-fg-muted, .fgColor-muted { color: var(--fgColor-muted, var(--color-fg-muted)) !important; }
7
+ .color-fg-subtle { color: var(--fgColor-muted, var(--color-fg-subtle)) !important; }
8
+
9
+ .color-fg-accent, .fgColor-accent { color: var(--fgColor-accent, var(--color-accent-fg)) !important; }
10
+ .color-fg-success, .fgColor-success { color: var(--fgColor-success, var(--color-success-fg)) !important; }
11
+ .color-fg-attention, .fgColor-attention { color: var(--fgColor-attention, var(--color-attention-fg)) !important; }
12
+ .color-fg-severe, .fgColor-severe { color: var(--fgColor-severe, var(--color-severe-fg)) !important; }
13
+ .color-fg-danger, .fgColor-danger { color: var(--fgColor-danger, var(--color-danger-fg)) !important; }
14
+ .color-fg-open, .fgColor-open { color: var(--fgColor-open, var(--color-open-fg)) !important; }
15
+ .color-fg-closed, .fgColor-closed { color: var(--fgColor-closed, var(--color-closed-fg)) !important; }
16
+ .color-fg-done, .fgColor-done { color: var(--fgColor-done, var(--color-done-fg)) !important; }
17
+ .color-fg-sponsors, .fgColor-sponsors { color: var(--fgColor-sponsors, var(--color-sponsors-fg)) !important; }
18
+
19
+ .color-fg-on-emphasis, .fgColor-onEmphasis { color: var(--fgColor-onEmphasis, var(--color-fg-on-emphasis)) !important; }
20
20
 
21
21
  // Background
22
22
 
23
- .color-bg-default { background-color: var(--color-canvas-default) !important; }
24
- .color-bg-overlay { background-color: var(--color-canvas-overlay) !important; }
25
- .color-bg-inset { background-color: var(--color-canvas-inset) !important; }
26
- .color-bg-subtle { background-color: var(--color-canvas-subtle) !important; }
27
- .color-bg-emphasis { background-color: var(--color-neutral-emphasis-plus) !important; }
23
+ .color-bg-default, .bgColor-default { background-color: var(--bgColor-default, var(--color-canvas-default)) !important; }
24
+ .color-bg-overlay { background-color: var(--overlay-bgColor, var(--color-canvas-overlay)) !important; }
25
+ .color-bg-inset, .bgColor-inset { background-color: var(--bgColor-inset, var(--color-canvas-inset)) !important; }
26
+ .color-bg-subtle, .bgColor-muted { background-color: var(--bgColor-muted, var(--color-canvas-subtle)) !important; }
27
+ .color-bg-emphasis, .bgColor-emphasis { background-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus)) !important; }
28
28
 
29
- .color-bg-accent { background-color: var(--color-accent-subtle) !important; }
30
- .color-bg-accent-emphasis { background-color: var(--color-accent-emphasis) !important; }
29
+ .color-bg-accent, .bgColor-accent-muted { background-color: var(--bgColor-accent-muted, var(--color-accent-subtle)) !important; }
30
+ .color-bg-accent-emphasis, .bgColor-accent-emphasis { background-color: var(--bgColor-accent-emphasis, var(--color-accent-emphasis)) !important; }
31
31
 
32
- .color-bg-success { background-color: var(--color-success-subtle) !important; }
33
- .color-bg-success-emphasis { background-color: var(--color-success-emphasis) !important; }
32
+ .color-bg-success, .bgColor-success-muted { background-color: var(--bgColor-success-muted, var(--color-success-subtle)) !important; }
33
+ .color-bg-success-emphasis, .bgColor-success-emphasis { background-color: var(--bgColor-success-emphasis, var(--color-success-emphasis)) !important; }
34
34
 
35
- .color-bg-attention { background-color: var(--color-attention-subtle) !important; }
36
- .color-bg-attention-emphasis { background-color: var(--color-attention-emphasis) !important; }
35
+ .color-bg-attention, .bgColor-attention-muted { background-color: var(--bgColor-attention-muted, var(--color-attention-subtle)) !important; }
36
+ .color-bg-attention-emphasis, .bgColor-attention-emphasis { background-color: var(--bgColor-attention-emphasis, var(--color-attention-emphasis)) !important; }
37
37
 
38
- .color-bg-severe { background-color: var(--color-severe-subtle) !important; }
39
- .color-bg-severe-emphasis { background-color: var(--color-severe-emphasis) !important; }
38
+ .color-bg-severe, .bgColor-severe-muted { background-color: var(--bgColor-severe-muted, var(--color-severe-subtle)) !important; }
39
+ .color-bg-severe-emphasis, .bgColor-severe-emphasis { background-color: var(--bgColor-severe-emphasis, var(--color-severe-emphasis)) !important; }
40
40
 
41
- .color-bg-danger { background-color: var(--color-danger-subtle) !important; }
42
- .color-bg-danger-emphasis { background-color: var(--color-danger-emphasis) !important; }
41
+ .color-bg-danger, .bgColor-danger-muted { background-color: var(--bgColor-danger-muted, var(--color-danger-subtle)) !important; }
42
+ .color-bg-danger-emphasis, .bgColor-danger-emphasis { background-color: var(--bgColor-danger-emphasis, var(--color-danger-emphasis)) !important; }
43
43
 
44
- .color-bg-open { background-color: var(--color-open-subtle) !important; }
45
- .color-bg-open-emphasis { background-color: var(--color-open-emphasis) !important; }
44
+ .color-bg-open, .bgColor-open-muted { background-color: var(--bgColor-open-muted, var(--color-open-subtle)) !important; }
45
+ .color-bg-open-emphasis, .bgColor-open-emphasis { background-color: var(--bgColor-open-emphasis, var(--color-open-emphasis)) !important; }
46
46
 
47
- .color-bg-closed { background-color: var(--color-closed-subtle) !important; }
48
- .color-bg-closed-emphasis { background-color: var(--color-closed-emphasis) !important; }
47
+ .color-bg-closed, .bgColor-closed-muted { background-color: var(--bgColor-closed-muted, var(--color-closed-subtle)) !important; }
48
+ .color-bg-closed-emphasis, .bgColor-closed-emphasis { background-color: var(--bgColor-closed-emphasis, var(--color-closed-emphasis)) !important; }
49
49
 
50
- .color-bg-done { background-color: var(--color-done-subtle) !important; }
51
- .color-bg-done-emphasis { background-color: var(--color-done-emphasis) !important; }
50
+ .color-bg-done, .bgColor-done-muted { background-color: var(--bgColor-done-muted, var(--color-done-subtle)) !important; }
51
+ .color-bg-done-emphasis, .bgColor-done-emphasis { background-color: var(--bgColor-done-emphasis, var(--color-done-emphasis)) !important; }
52
52
 
53
- .color-bg-sponsors { background-color: var(--color-sponsors-subtle) !important; }
54
- .color-bg-sponsors-emphasis { background-color: var(--color-sponsors-emphasis) !important; }
53
+ .color-bg-sponsors, .bgColor-sponsors-muted { background-color: var(--bgColor-sponsors-muted, var(--color-sponsors-subtle)) !important; }
54
+ .color-bg-sponsors-emphasis, .bgColor-sponsors-emphasis { background-color: var(--bgColor-sponsors-emphasis, var(--color-sponsors-emphasis)) !important; }
55
55
 
56
- .color-bg-transparent { background-color: transparent !important; }
56
+ .color-bg-transparent, .bgColor-transparent { background-color: transparent !important; }
57
57
 
58
58
  // Border
59
59
 
60
- .color-border-default { border-color: var(--color-border-default) !important; }
61
- .color-border-muted { border-color: var(--color-border-muted) !important; }
62
- .color-border-subtle { border-color: var(--color-border-subtle) !important; }
60
+ .color-border-default, .borderColor-default { border-color: var(--borderColor-default, var(--color-border-default)) !important; }
61
+ .color-border-muted, .borderColor-muted { border-color: var(--borderColor-muted, var(--color-border-muted)) !important; }
62
+ .color-border-subtle { border-color: var(--borderColor-muted, var(--color-border-subtle)) !important; }
63
63
 
64
- .color-border-accent { border-color: var(--color-accent-muted) !important; }
65
- .color-border-accent-emphasis { border-color: var(--color-accent-emphasis) !important; }
64
+ .color-border-accent, .borderColor-accent-muted { border-color: var(--borderColor-accent-muted, var(--color-accent-muted)) !important; }
65
+ .color-border-accent-emphasis, .borderColor-accent-emphasis { border-color: var(--borderColor-accent-emphasis, var(--color-accent-emphasis)) !important; }
66
66
 
67
- .color-border-success { border-color: var(--color-success-muted) !important; }
68
- .color-border-success-emphasis { border-color: var(--color-success-emphasis) !important; }
67
+ .color-border-success, .borderColor-success-muted { border-color: var(--borderColor-success-muted, var(--color-success-muted)) !important; }
68
+ .color-border-success-emphasis, .borderColor-success-emphasis { border-color: var(--borderColor-success-emphasis, var(--color-success-emphasis)) !important; }
69
69
 
70
- .color-border-attention { border-color: var(--color-attention-muted) !important; }
71
- .color-border-attention-emphasis { border-color: var(--color-attention-emphasis) !important; }
70
+ .color-border-attention, .borderColor-attention-muted { border-color: var(--borderColor-attention-muted, var(--color-attention-muted)) !important; }
71
+ .color-border-attention-emphasis, .borderColor-attention-emphasis { border-color: var(--borderColor-attention-emphasis, var(--color-attention-emphasis)) !important; }
72
72
 
73
- .color-border-severe { border-color: var(--color-severe-muted) !important; }
74
- .color-border-severe-emphasis { border-color: var(--color-severe-emphasis) !important; }
73
+ .color-border-severe, .borderColor-severe-muted { border-color: var(--borderColor-severe-muted, var(--color-severe-muted)) !important; }
74
+ .color-border-severe-emphasis, .borderColor-severe-emphasis { border-color: var(--borderColor-severe-emphasis, var(--color-severe-emphasis)) !important; }
75
75
 
76
- .color-border-danger { border-color: var(--color-danger-muted) !important; }
77
- .color-border-danger-emphasis { border-color: var(--color-danger-emphasis) !important; }
76
+ .color-border-danger, .borderColor-danger-muted { border-color: var(--borderColor-danger-muted, var(--color-danger-muted)) !important; }
77
+ .color-border-danger-emphasis, .borderColor-danger-emphasis { border-color: var(--borderColor-danger-emphasis, var(--color-danger-emphasis)) !important; }
78
78
 
79
- .color-border-open { border-color: var(--color-open-muted) !important; }
80
- .color-border-open-emphasis { border-color: var(--color-open-emphasis) !important; }
79
+ .color-border-open, .borderColor-open-muted { border-color: var(--borderColor-open-muted, var(--color-open-muted)) !important; }
80
+ .color-border-open-emphasis, .borderColor-open-emphasis { border-color: var(--borderColor-open-emphasis, var(--color-open-emphasis)) !important; }
81
81
 
82
- .color-border-closed { border-color: var(--color-closed-muted) !important; }
83
- .color-border-closed-emphasis { border-color: var(--color-closed-emphasis) !important; }
82
+ .color-border-closed, .borderColor-closed-muted { border-color: var(--borderColor-closed-muted, var(--color-closed-muted)) !important; }
83
+ .color-border-closed-emphasis, .borderColor-closed-emphasis { border-color: var(--borderColor-closed-emphasis, var(--color-closed-emphasis)) !important; }
84
84
 
85
- .color-border-done { border-color: var(--color-done-muted) !important; }
86
- .color-border-done-emphasis { border-color: var(--color-done-emphasis) !important; }
85
+ .color-border-done, .borderColor-done-muted { border-color: var(--borderColor-done-muted, var(--color-done-muted)) !important; }
86
+ .color-border-done-emphasis, .borderColor-done-emphasis { border-color: var(--borderColor-done-emphasis, var(--color-done-emphasis)) !important; }
87
87
 
88
- .color-border-sponsors { border-color: var(--color-sponsors-muted) !important; }
89
- .color-border-sponsors-emphasis { border-color: var(--color-sponsors-emphasis) !important; }
88
+ .color-border-sponsors, .borderColor-sponsors-muted { border-color: var(--borderColor-sponsors-muted, var(--color-sponsors-muted)) !important; }
89
+ .color-border-sponsors-emphasis, .borderColor-sponsors-emphasis { border-color: var(--borderColor-sponsors-emphasis, var(--color-sponsors-emphasis)) !important; }
90
90
 
91
91
  // Misc
92
92
 
93
- .color-fg-inherit {
93
+ .color-fg-inherit, .fgColor-inherit {
94
94
  color: inherit !important;
95
95
  }
@@ -17,7 +17,7 @@
17
17
 
18
18
  .details-overlay-dark[open] > summary::before {
19
19
  z-index: 111;
20
- background: var(--color-primer-canvas-backdrop);
20
+ background: var(--overlay-backdrop-bgColor, var(--color-primer-canvas-backdrop));
21
21
  }
22
22
 
23
23
  .details-reset {
@@ -1,7 +1,6 @@
1
1
  @import "../support/mixins/layout.scss";
2
2
 
3
3
  // Flex utility classes
4
- // stylelint-disable block-opening-brace-space-before
5
4
  @each $breakpoint, $variant in $responsive-variants {
6
5
  @include breakpoint($breakpoint) {
7
6
  // Flexbox classes
@@ -1,7 +1,7 @@
1
1
  @import "../support/mixins/layout.scss";
2
2
 
3
3
  // Layout
4
- // stylelint-disable block-opening-brace-space-before, comment-empty-line-before
4
+ // stylelint-disable comment-empty-line-before
5
5
 
6
6
  /* Position */
7
7
  @each $breakpoint, $variant in $responsive-variants {
@@ -73,13 +73,15 @@
73
73
  // Width and height utilities, helpful in combination
74
74
  // with display-table utilities and images
75
75
  /* Max width 100% */
76
- .width-fit { max-width: 100% !important; }
76
+ .width-fit { max-width: 100% !important; }
77
77
  /* Set the width to 100% */
78
- .width-full { width: 100% !important; }
78
+ .width-full { width: 100% !important; }
79
+ /* Set the max-width to 65 characters */
80
+ .width-comfortable { max-width: 65ch !important; }
79
81
  /* Max height 100% */
80
- .height-fit { max-height: 100% !important; }
82
+ .height-fit { max-height: 100% !important; }
81
83
  /* Set the height to 100% */
82
- .height-full { height: 100% !important; }
84
+ .height-full { height: 100% !important; }
83
85
 
84
86
  /* Remove min-width from element */
85
87
  .min-width-0 { min-width: 0 !important; }
@@ -2,8 +2,6 @@
2
2
  @import "../support/mixins/layout.scss";
3
3
 
4
4
  // Margin spacer utilities
5
- // stylelint-disable block-opening-brace-space-before
6
- // stylelint-disable declaration-colon-space-before
7
5
  // stylelint-disable comment-empty-line-before
8
6
  // stylelint-disable primer/spacing
9
7
 
@@ -2,7 +2,6 @@
2
2
  @import "../support/mixins/layout.scss";
3
3
 
4
4
  // Padding spacer utilities
5
- // stylelint-disable block-opening-brace-space-before
6
5
  // stylelint-disable comment-empty-line-before
7
6
  // stylelint-disable primer/spacing
8
7
 
@@ -44,16 +43,16 @@
44
43
 
45
44
  // responsive padding for containers
46
45
  .p-responsive {
47
- padding-right: var(--base-size-16, $spacer-3) !important;
48
- padding-left: var(--base-size-16, $spacer-3) !important;
46
+ padding-right: var(--base-size-16) !important;
47
+ padding-left: var(--base-size-16) !important;
49
48
 
50
49
  @include breakpoint(sm) {
51
- padding-right: var(--base-size-40, $spacer-6) !important;
52
- padding-left: var(--base-size-40, $spacer-6) !important;
50
+ padding-right: var(--base-size-40) !important;
51
+ padding-left: var(--base-size-40) !important;
53
52
  }
54
53
 
55
54
  @include breakpoint(lg) {
56
- padding-right: var(--base-size-16, $spacer-3) !important;
57
- padding-left: var(--base-size-16, $spacer-3) !important;
55
+ padding-right: var(--base-size-16) !important;
56
+ padding-left: var(--base-size-16) !important;
58
57
  }
59
58
  }
@@ -1,7 +1,7 @@
1
1
  @import "../support/variables/typography.scss";
2
2
  @import "../support/mixins/layout.scss";
3
3
 
4
- // stylelint-disable comment-empty-line-before
4
+ // stylelint-disable comment-empty-line-before, primer/typography
5
5
 
6
6
  // Type scale variables found in ../support/lib/variables.scss
7
7
  // $h00-size-mobile: 40px;
@@ -69,7 +69,7 @@
69
69
  .h4,
70
70
  .h5,
71
71
  .h6 {
72
- font-weight: var(--base-text-weight-semibold, $font-weight-bold) !important;
72
+ font-weight: $font-weight-bold !important;
73
73
  }
74
74
 
75
75
  // Type utilities that match type sale
@@ -123,7 +123,7 @@
123
123
  /* Set the font size to 40px and weight to light */
124
124
  .f00-light {
125
125
  font-size: var(--h00-size-mobile, $h00-size-mobile) !important;
126
- font-weight: var(--base-text-weight-light, $font-weight-light) !important;
126
+ font-weight: $font-weight-light !important;
127
127
 
128
128
  @include breakpoint(md) {
129
129
  font-size: var(--h00-size, $h00-size) !important;
@@ -133,7 +133,7 @@
133
133
  /* Set the font size to 32px and weight to light */
134
134
  .f0-light {
135
135
  font-size: var(--h0-size-mobile, $h0-size-mobile) !important;
136
- font-weight: var(--base-text-weight-light, $font-weight-light) !important;
136
+ font-weight: $font-weight-light !important;
137
137
 
138
138
  @include breakpoint(md) {
139
139
  font-size: var(--h0-size, $h0-size) !important;
@@ -143,7 +143,7 @@
143
143
  /* Set the font size to 26px and weight to light */
144
144
  .f1-light {
145
145
  font-size: var(--h1-size-mobile, $h1-size-mobile) !important;
146
- font-weight: var(--base-text-weight-light, $font-weight-light) !important;
146
+ font-weight: $font-weight-light !important;
147
147
 
148
148
  @include breakpoint(md) {
149
149
  font-size: var(--h1-size, $h1-size) !important;
@@ -153,7 +153,7 @@
153
153
  /* Set the font size to 22px and weight to light */
154
154
  .f2-light {
155
155
  font-size: var(--h2-size-mobile, $h2-size-mobile) !important;
156
- font-weight: var(--base-text-weight-light, $font-weight-light) !important;
156
+ font-weight: $font-weight-light !important;
157
157
 
158
158
  @include breakpoint(md) {
159
159
  font-size: var(--h2-size, $h2-size) !important;
@@ -164,7 +164,7 @@
164
164
  /* Set the font size to 18px and weight to light */
165
165
  .f3-light {
166
166
  font-size: var(--h3-size-mobile, $h3-size-mobile) !important;
167
- font-weight: var(--base-text-weight-light, $font-weight-light) !important;
167
+ font-weight: $font-weight-light !important;
168
168
 
169
169
  @include breakpoint(md) {
170
170
  font-size: var(--h3-size, $h3-size) !important;
@@ -184,7 +184,7 @@
184
184
  // stylelint-disable-next-line primer/spacing
185
185
  margin-bottom: 30px;
186
186
  font-size: var(--h3-size, $h3-size);
187
- font-weight: var(--base-text-weight-light, $font-weight-light);
187
+ font-weight: $font-weight-light;
188
188
  }
189
189
 
190
190
  // Line-height variations
@@ -311,7 +311,7 @@
311
311
  }
312
312
 
313
313
  .text-emphasized {
314
- font-weight: var(--base-text-weight-semibold, $font-weight-bold);
314
+ font-weight: $font-weight-bold;
315
315
  }
316
316
 
317
317
  // List styles
@@ -109,17 +109,18 @@
109
109
 
110
110
  // Only display content on focus
111
111
  .show-on-focus {
112
- position: absolute;
113
- width: 1px;
114
- height: 1px;
115
- margin: 0;
116
- overflow: hidden;
117
- clip: rect(1px, 1px, 1px, 1px);
112
+ position: absolute !important;
113
+
114
+ &:not(:focus) {
115
+ width: 1px !important;
116
+ height: 1px !important;
117
+ padding: 0 !important;
118
+ overflow: hidden !important;
119
+ clip: rect(1px, 1px, 1px, 1px) !important;
120
+ border: 0 !important;
121
+ }
118
122
 
119
123
  &:focus {
120
124
  z-index: 999;
121
- width: auto;
122
- height: auto;
123
- clip: auto;
124
125
  }
125
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papillonbits/css",
3
- "version": "1.0.0",
3
+ "version": "1.2.1",
4
4
  "description": "Papillon Bits CSS",
5
5
  "homepage": "https://github.com/papillonbits/papillonbits/tree/master/packages/css",
6
6
  "repository": {
@@ -23,5 +23,5 @@
23
23
  "build-acceptance": "npm run build",
24
24
  "build-release": "npm run build"
25
25
  },
26
- "gitHead": "d3a3345971608290c739b1e1383428445b81b310"
26
+ "gitHead": "819ac31d3cfbb740c476ae0cdb9c2b9e6035edbd"
27
27
  }