@primer/css 0.0.0-20220120020705 → 0.0.0-2022020193741

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 (124) hide show
  1. package/CHANGELOG.md +6 -53
  2. package/actionlist/action-list-item.scss +54 -120
  3. package/actionlist/index.scss +0 -1
  4. package/autocomplete/autocomplete.scss +1 -1
  5. package/avatars/avatar-stack.scss +0 -1
  6. package/base/base.scss +0 -1
  7. package/base/index.scss +1 -0
  8. package/blankslate/index.scss +1 -0
  9. package/breadcrumb/breadcrumb.scss +1 -1
  10. package/buttons/button-group.scss +2 -3
  11. package/buttons/button.scss +35 -0
  12. package/buttons/misc.scss +7 -6
  13. package/color-modes/native.scss +0 -12
  14. package/color-modes/themes/dark.scss +1 -0
  15. package/color-modes/themes/dark_colorblind.scss +1 -0
  16. package/color-modes/themes/dark_dimmed.scss +1 -0
  17. package/color-modes/themes/dark_high_contrast.scss +1 -0
  18. package/color-modes/themes/light.scss +1 -0
  19. package/color-modes/themes/light_colorblind.scss +1 -0
  20. package/color-modes/themes/light_high_contrast.scss +1 -0
  21. package/dist/actionlist.css +1 -1
  22. package/dist/actionlist.css.map +1 -1
  23. package/dist/alerts.css.map +1 -1
  24. package/dist/autocomplete.css.map +1 -1
  25. package/dist/avatars.css +1 -1
  26. package/dist/avatars.css.map +1 -1
  27. package/dist/base.css.map +1 -1
  28. package/dist/blankslate.css.map +1 -1
  29. package/dist/box.css.map +1 -1
  30. package/dist/branch-name.css.map +1 -1
  31. package/dist/breadcrumb.css.map +1 -1
  32. package/dist/buttons.css +1 -1
  33. package/dist/buttons.css.map +1 -1
  34. package/dist/color-modes.css +1 -1
  35. package/dist/color-modes.css.map +1 -1
  36. package/dist/core.css +1 -1
  37. package/dist/core.css.map +1 -1
  38. package/dist/dropdown.css.map +1 -1
  39. package/dist/forms.css.map +1 -1
  40. package/dist/header.css.map +1 -1
  41. package/dist/labels.css +1 -1
  42. package/dist/labels.css.map +1 -1
  43. package/dist/layout.css +1 -1
  44. package/dist/layout.css.map +1 -1
  45. package/dist/links.css.map +1 -1
  46. package/dist/loaders.css.map +1 -1
  47. package/dist/markdown.css.map +1 -1
  48. package/dist/marketing-buttons.css +1 -1
  49. package/dist/marketing-buttons.css.map +1 -1
  50. package/dist/marketing-type.css.map +1 -1
  51. package/dist/marketing-utilities.css +1 -1
  52. package/dist/marketing-utilities.css.map +1 -1
  53. package/dist/marketing.css +1 -1
  54. package/dist/marketing.css.map +1 -1
  55. package/dist/meta.json +84 -95
  56. package/dist/navigation.css.map +1 -1
  57. package/dist/pagination.css +1 -1
  58. package/dist/pagination.css.map +1 -1
  59. package/dist/popover.css +1 -1
  60. package/dist/popover.css.map +1 -1
  61. package/dist/primer.css +4 -4
  62. package/dist/primer.css.map +1 -1
  63. package/dist/product.css +1 -1
  64. package/dist/product.css.map +1 -1
  65. package/dist/progress.css.map +1 -1
  66. package/dist/select-menu.css.map +1 -1
  67. package/dist/stats/actionlist.json +1 -1
  68. package/dist/stats/avatars.json +1 -1
  69. package/dist/stats/buttons.json +1 -1
  70. package/dist/stats/color-modes.json +1 -1
  71. package/dist/stats/core.json +1 -1
  72. package/dist/stats/labels.json +1 -1
  73. package/dist/stats/layout.json +1 -1
  74. package/dist/stats/marketing-buttons.json +1 -1
  75. package/dist/stats/marketing-utilities.json +1 -1
  76. package/dist/stats/marketing.json +1 -1
  77. package/dist/stats/pagination.json +1 -1
  78. package/dist/stats/popover.json +1 -1
  79. package/dist/stats/primer.json +1 -1
  80. package/dist/stats/product.json +1 -1
  81. package/dist/stats/utilities.json +1 -1
  82. package/dist/subhead.css.map +1 -1
  83. package/dist/timeline.css.map +1 -1
  84. package/dist/toasts.css.map +1 -1
  85. package/dist/tooltips.css.map +1 -1
  86. package/dist/truncate.css.map +1 -1
  87. package/dist/utilities.css +1 -1
  88. package/dist/utilities.css.map +1 -1
  89. package/forms/form-control.scss +0 -2
  90. package/labels/counters.scss +1 -1
  91. package/labels/index.scss +1 -0
  92. package/labels/labels.scss +0 -1
  93. package/layout/index.scss +1 -1
  94. package/layout/layout.scss +11 -8
  95. package/layout/mixins.scss +4 -30
  96. package/markdown/images.scss +2 -2
  97. package/marketing/buttons/button.scss +0 -8
  98. package/marketing/index.scss +0 -1
  99. package/marketing/type/typography.scss +0 -3
  100. package/marketing/utilities/animations.scss +0 -42
  101. package/navigation/filter-list.scss +2 -2
  102. package/navigation/menu.scss +2 -2
  103. package/navigation/sidenav.scss +2 -2
  104. package/navigation/subnav.scss +2 -2
  105. package/navigation/tabnav.scss +2 -2
  106. package/navigation/underline-nav.scss +2 -2
  107. package/package.json +13 -14
  108. package/pagination/pagination.scss +4 -41
  109. package/popover/popover.scss +1 -1
  110. package/select-menu/select-menu.scss +2 -2
  111. package/stylelint.config.cjs +11 -2
  112. package/support/mixins/color-modes.scss +0 -3
  113. package/support/mixins/misc.scss +16 -0
  114. package/support/mixins/typography.scss +2 -3
  115. package/support/variables/layout.scss +2 -1
  116. package/utilities/visibility-display.scss +3 -3
  117. package/actionlist/action-list-tree.scss +0 -92
  118. package/dist/marketing-links.css +0 -2
  119. package/dist/marketing-links.css.map +0 -1
  120. package/dist/marketing-links.js +0 -1
  121. package/dist/stats/marketing-links.json +0 -1
  122. package/layout/page-layout.scss +0 -380
  123. package/marketing/links/index.scss +0 -3
  124. package/marketing/links/link.scss +0 -50
package/labels/index.scss CHANGED
@@ -1,5 +1,6 @@
1
1
  @import '../support/index.scss';
2
2
  @import './mixins.scss';
3
+
3
4
  @import './issue-labels.scss';
4
5
  @import './labels.scss';
5
6
  @import './states.scss';
@@ -10,7 +10,6 @@
10
10
  .label, // TODO: Deprecte
11
11
  .Label {
12
12
  @include labels-base;
13
-
14
13
  border-color: var(--color-border-default);
15
14
 
16
15
  &:hover {
package/layout/index.scss CHANGED
@@ -1,7 +1,7 @@
1
1
  @import '../support/index.scss';
2
2
  @import './mixins.scss';
3
+
3
4
  @import './container.scss';
4
5
  @import './grid.scss';
5
6
  @import './grid-offset.scss';
6
7
  @import './layout.scss';
7
- @import './page-layout.scss';
@@ -2,22 +2,21 @@
2
2
 
3
3
  .Layout {
4
4
  display: grid;
5
-
6
5
  --Layout-sidebar-width: #{map-get($sidebar-width, 'sm')};
7
6
  --Layout-gutter: 16px;
8
7
 
9
- @media (max-width: calc(#{$width-sm} - 0.02px)) {
8
+ @media (max-width: calc(#{$width-sm} - 1px)) {
10
9
  @include flow-as-row;
11
10
  }
12
11
 
13
12
  &.Layout--flowRow-until-md {
14
- @media (max-width: calc(#{$width-md} - 0.02px)) {
13
+ @media (max-width: calc(#{$width-md} - 1px)) {
15
14
  @include flow-as-row;
16
15
  }
17
16
  }
18
17
 
19
18
  &.Layout--flowRow-until-lg {
20
- @media (max-width: calc(#{$width-lg} - 0.02px)) {
19
+ @media (max-width: calc(#{$width-lg} - 1px)) {
21
20
  @include flow-as-row;
22
21
  }
23
22
  }
@@ -25,7 +24,8 @@
25
24
  // Flow as column
26
25
 
27
26
  grid-auto-flow: column;
28
- grid-template-columns: auto 0 minmax(0, calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))); // sidebar column, separator, main column
27
+ grid-template-columns: auto 0 1fr; // sidebar column, separator, main column
28
+ // stylelint-disable-next-line primer/no-undefined-vars
29
29
  grid-gap: var(--Layout-gutter);
30
30
 
31
31
  .Layout-sidebar {
@@ -47,8 +47,7 @@
47
47
  }
48
48
 
49
49
  &.Layout--gutter-none {
50
- // stylelint-disable-next-line length-zero-no-unit
51
- --Layout-gutter: 0px;
50
+ --Layout-gutter: 0;
52
51
  }
53
52
 
54
53
  &.Layout--gutter-condensed {
@@ -102,7 +101,7 @@
102
101
  }
103
102
 
104
103
  &.Layout--sidebarPosition-end {
105
- grid-template-columns: minmax(0, calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))) 0 auto;
104
+ grid-template-columns: 1fr 0 auto;
106
105
 
107
106
  .Layout-main {
108
107
  grid-column: 1;
@@ -147,6 +146,7 @@
147
146
  }
148
147
 
149
148
  .Layout-sidebar {
149
+ // stylelint-disable-next-line primer/no-undefined-vars
150
150
  width: var(--Layout-sidebar-width);
151
151
  }
152
152
 
@@ -169,14 +169,17 @@
169
169
  }
170
170
 
171
171
  .Layout-main-centered-md {
172
+ // stylelint-disable-next-line primer/no-undefined-vars
172
173
  max-width: calc(#{$container-md} + var(--Layout-sidebar-width) + var(--Layout-gutter));
173
174
  }
174
175
 
175
176
  .Layout-main-centered-lg {
177
+ // stylelint-disable-next-line primer/no-undefined-vars
176
178
  max-width: calc(#{$container-lg} + var(--Layout-sidebar-width) + var(--Layout-gutter));
177
179
  }
178
180
 
179
181
  .Layout-main-centered-xl {
182
+ // stylelint-disable-next-line primer/no-undefined-vars
180
183
  max-width: calc(#{$container-xl} + var(--Layout-sidebar-width) + var(--Layout-gutter));
181
184
  }
182
185
  }
@@ -1,4 +1,4 @@
1
- // Layout alpha mixins
1
+ // Layout mixins
2
2
 
3
3
  @mixin flow-as-row {
4
4
  grid-auto-flow: row;
@@ -7,9 +7,9 @@
7
7
  .Layout-sidebar,
8
8
  .Layout-divider,
9
9
  .Layout-main {
10
- width: 100% !important;
11
- grid-column: 1 !important;
12
- }
10
+ width: 100% !important;
11
+ grid-column: 1 !important;
12
+ }
13
13
 
14
14
  &.Layout--sidebarPosition-flowRow-start {
15
15
  .Layout-sidebar {
@@ -77,29 +77,3 @@
77
77
  }
78
78
  }
79
79
  }
80
-
81
- // Layout beta mixins
82
-
83
- // responsive region dividers
84
-
85
- @mixin Layout-line-divider {
86
- position: absolute;
87
- left: calc(var(--Layout-outer-spacing-x) * -1);
88
- display: block;
89
- width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
90
- height: 1px;
91
- content: '';
92
- background-color: $Layout-divider-color;
93
- }
94
-
95
- @mixin Layout-filled-divider {
96
- position: absolute;
97
- bottom: calc(#{$spacer-2} * -1); // -8px
98
- left: calc(var(--Layout-outer-spacing-x) * -1);
99
- display: block;
100
- width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
101
- height: #{$spacer-2}; // 8px
102
- content: '';
103
- background-color: var(--color-canvas-inset);
104
- box-shadow: inset 0 1px $Layout-divider-color, inset 0 -1px $Layout-divider-color;
105
- }
@@ -10,12 +10,12 @@
10
10
  box-sizing: content-box;
11
11
  background-color: var(--color-canvas-default);
12
12
 
13
- &[align='right'] {
13
+ &[align=right] {
14
14
  // stylelint-disable-next-line primer/spacing
15
15
  padding-left: 20px;
16
16
  }
17
17
 
18
- &[align='left'] {
18
+ &[align=left] {
19
19
  // stylelint-disable-next-line primer/spacing
20
20
  padding-right: 20px;
21
21
  }
@@ -38,7 +38,6 @@
38
38
  }
39
39
 
40
40
  &:hover {
41
- text-decoration: none;
42
41
  box-shadow: var(--color-mktg-btn-shadow-hover) !important;
43
42
  }
44
43
 
@@ -69,13 +68,6 @@
69
68
  opacity: 0.5 !important;
70
69
  }
71
70
  }
72
-
73
- &.disabled,
74
- &[disabled] {
75
- pointer-events: none;
76
- cursor: default;
77
- opacity: 0.5;
78
- }
79
71
  }
80
72
 
81
73
  .btn-muted-mktg {
@@ -11,5 +11,4 @@
11
11
  // marketing specific css modules
12
12
  @import './type/index.scss';
13
13
  @import './buttons/index.scss';
14
- @import './links/index.scss';
15
14
  @import './utilities/index.scss';
@@ -21,7 +21,6 @@
21
21
 
22
22
  font-size: map-get($pairing, 'size') !important;
23
23
  line-height: map-get($pairing, 'lh') !important;
24
-
25
24
  @if (map-get($pairing, 'size') >= $mktg-header-weight-threshold) { font-weight: $mktg-header-weight-large !important; }
26
25
 
27
26
  @if (nth($sizes, 1) != nth($sizes, 2)) {
@@ -76,9 +75,7 @@
76
75
 
77
76
  font-size: map-get($pairing, 'size') !important;
78
77
  line-height: map-get($pairing, 'lh') !important;
79
-
80
78
  @if (map-get($pairing, 'size') >= $mktg-body-spacing-threshold) { letter-spacing: $mktg-body-spacing-large !important; }
81
-
82
79
  @if (map-get($pairing, 'size') >= $mktg-body-weight-threshold) { font-weight: $font-weight-semibold; }
83
80
 
84
81
  @if (nth($sizes, 1) != nth($sizes, 2)) {
@@ -7,45 +7,3 @@
7
7
  transform: scale3d(1.025, 1.025, 1.025);
8
8
  }
9
9
  }
10
-
11
- // Animated arrow symbol, used in marketing links, buttons, etc.
12
- .btn-mktg,
13
- .link-mktg,
14
- .arrow-target-mktg {
15
- .octicon {
16
- width: 1em;
17
- height: 1em;
18
- }
19
-
20
- .arrow-symbol-mktg {
21
- transition: transform 0.2s;
22
- transform: translateX(0);
23
-
24
- // stylelint-disable-next-line selector-max-type
25
- path:last-child {
26
- stroke-dasharray: 10;
27
- stroke-dashoffset: 10;
28
- transition: stroke-dashoffset 0.2s;
29
- }
30
- }
31
-
32
- @media screen and (prefers-reduced-motion: no-preference) {
33
- &:hover,
34
- &:focus {
35
- .arrow-symbol-mktg {
36
- transform: translateX(4px);
37
-
38
- // stylelint-disable-next-line selector-max-type, selector-max-specificity, max-nesting-depth
39
- path:last-child {
40
- stroke-dashoffset: 20;
41
- }
42
- }
43
- }
44
-
45
- &:active {
46
- .arrow-symbol-mktg {
47
- transform: translateX(6px);
48
- }
49
- }
50
- }
51
- }
@@ -41,8 +41,8 @@
41
41
  }
42
42
 
43
43
  &.selected,
44
- &[aria-selected='true'],
45
- &[aria-current]:not([aria-current='false']) {
44
+ &[aria-selected=true],
45
+ &[aria-current]:not([aria-current=false]) {
46
46
  color: var(--color-fg-on-emphasis);
47
47
  background-color: var(--color-accent-emphasis);
48
48
  }
@@ -49,8 +49,8 @@
49
49
  }
50
50
 
51
51
  &.selected,
52
- &[aria-selected='true'],
53
- &[aria-current]:not([aria-current='false']) {
52
+ &[aria-selected=true],
53
+ &[aria-current]:not([aria-current=false]) {
54
54
  cursor: default;
55
55
  background-color: var(--color-menu-bg-active);
56
56
 
@@ -59,7 +59,7 @@
59
59
  background-color: var(--color-canvas-subtle);
60
60
  }
61
61
 
62
- .SideNav-item[aria-current]:not([aria-current='false']),
62
+ .SideNav-item[aria-current]:not([aria-current=false]),
63
63
  .SideNav-item[aria-selected='true'] {
64
64
  background-color: var(--color-sidenav-selected-bg);
65
65
 
@@ -101,7 +101,7 @@
101
101
  outline: none;
102
102
  }
103
103
 
104
- .SideNav-subItem[aria-current]:not([aria-current='false']),
104
+ .SideNav-subItem[aria-current]:not([aria-current=false]),
105
105
  .SideNav-subItem[aria-selected='true'] {
106
106
  font-weight: $font-weight-semibold;
107
107
  color: var(--color-fg-default);
@@ -40,8 +40,8 @@
40
40
  }
41
41
 
42
42
  &.selected,
43
- &[aria-selected='true'],
44
- &[aria-current]:not([aria-current='false']) {
43
+ &[aria-selected=true],
44
+ &[aria-current]:not([aria-current=false]) {
45
45
  z-index: 2;
46
46
  color: var(--color-fg-on-emphasis);
47
47
  background-color: var(--color-accent-emphasis);
@@ -28,8 +28,8 @@
28
28
  transition: color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
29
29
 
30
30
  &.selected,
31
- &[aria-selected='true'],
32
- &[aria-current]:not([aria-current='false']) {
31
+ &[aria-selected=true],
32
+ &[aria-current]:not([aria-current=false]) {
33
33
  color: var(--color-fg-default);
34
34
  background-color: var(--color-canvas-default); // cover bottom border
35
35
  border-color: var(--color-border-default);
@@ -35,8 +35,8 @@
35
35
  }
36
36
 
37
37
  &.selected,
38
- &[role='tab'][aria-selected='true'],
39
- &[aria-current]:not([aria-current='false']) {
38
+ &[role=tab][aria-selected=true],
39
+ &[aria-current]:not([aria-current=false]) {
40
40
  font-weight: $font-weight-bold;
41
41
  color: var(--color-fg-default);
42
42
  border-bottom-color: var(--color-primer-border-active);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/css",
3
- "version": "0.0.0-20220120020705",
3
+ "version": "0.0.0-2022020193741",
4
4
  "description": "The CSS implementation of GitHub's Primer Design System",
5
5
  "homepage": "https://primer.style/css",
6
6
  "author": "GitHub, Inc.",
@@ -24,7 +24,6 @@
24
24
  ],
25
25
  "scripts": {
26
26
  "dist": "script/dist.js",
27
- "dist:watch": "chokidar \"src/**/*.scss\" -c \"script/dist.js\"",
28
27
  "stylelint": "stylelint --quiet 'src/**/*.scss'",
29
28
  "eslint": "eslint deprecations.js __tests__ script",
30
29
  "prepublishOnly": "script/prepublish",
@@ -36,37 +35,37 @@
36
35
  "storybook": "cd docs && yarn && yarn storybook"
37
36
  },
38
37
  "dependencies": {
39
- "@primer/primitives": "^7.4.0"
38
+ "@primer/primitives": "^7.2.0"
40
39
  },
41
40
  "devDependencies": {
42
41
  "@changesets/changelog-github": "0.4.2",
43
- "@changesets/cli": "2.19.0",
42
+ "@changesets/cli": "2.18.1",
44
43
  "@github/prettier-config": "0.0.4",
45
44
  "@koddsson/postcss-sass": "5.0.0",
46
- "@primer/stylelint-config": "12.2.0",
47
- "autoprefixer": "10.4.1",
48
- "chokidar-cli": "3.0.0",
45
+ "@primer/stylelint-config": "12.1.1",
46
+ "autoprefixer": "10.4.0",
49
47
  "cssstats": "4.0.2",
50
- "eslint": "8.6.0",
48
+ "eslint": "8.3.0",
51
49
  "eslint-plugin-github": "4.3.5",
52
- "eslint-plugin-jest": "25.3.3",
50
+ "eslint-plugin-jest": "25.3.0",
53
51
  "eslint-plugin-prettier": "4.0.0",
54
52
  "filesize": "8.0.6",
55
53
  "front-matter": "4.0.2",
56
54
  "fs-extra": "10.0.0",
57
55
  "globby": "12.0.2",
58
- "jest": "27.4.5",
56
+ "jest": "27.4.2",
59
57
  "js-yaml": "4.1.0",
60
- "postcss": "8.4.5",
58
+ "postcss": "8.4.4",
61
59
  "postcss-calc": "8.0.0",
62
60
  "postcss-import": "14.0.2",
63
61
  "postcss-load-config": "3.1.0",
64
62
  "postcss-scss": "4.0.2",
65
63
  "postcss-simple-vars": "6.0.3",
66
- "prettier": "2.5.1",
64
+ "prettier": "2.5.0",
67
65
  "semver": "7.3.5",
68
- "stylelint": "14.2.0",
69
- "table": "6.7.5"
66
+ "stylelint": "14.1.0",
67
+ "stylelint-scss": "4.0.0",
68
+ "table": "6.7.3"
70
69
  },
71
70
  "jest": {
72
71
  "testEnvironment": "node",
@@ -4,6 +4,7 @@
4
4
  a,
5
5
  span,
6
6
  em {
7
+ display: inline-block;
7
8
  min-width: 32px;
8
9
  // stylelint-disable-next-line primer/spacing
9
10
  padding: 5px 10px;
@@ -41,7 +42,7 @@
41
42
 
42
43
  .current,
43
44
  .current:hover,
44
- [aria-current]:not([aria-current='false']) {
45
+ [aria-current]:not([aria-current=false]) {
45
46
  color: var(--color-fg-on-emphasis);
46
47
  background-color: var(--color-accent-emphasis);
47
48
  border-color: transparent;
@@ -49,10 +50,10 @@
49
50
 
50
51
  .gap,
51
52
  .disabled,
52
- [aria-disabled='true'],
53
+ [aria-disabled=true],
53
54
  .gap:hover,
54
55
  .disabled:hover,
55
- [aria-disabled='true']:hover {
56
+ [aria-disabled=true]:hover {
56
57
  color: var(--color-primer-fg-disabled);
57
58
  cursor: default;
58
59
  border-color: transparent;
@@ -83,44 +84,6 @@
83
84
  clip-path: polygon(6.2px 3.2px, 7.3px 3.2px, 11.5px 7.5px, 11.5px 8.5px, 7.3px 12.8px, 6.2px 11.7px, 9.9px 8px, 6.2px 4.3px, 6.2px 3.2px);
84
85
  }
85
86
  }
86
-
87
- // Responsive
88
-
89
- // Hide everything by default
90
- > * {
91
- display: none;
92
- }
93
-
94
- // 0 -> sm
95
- // Only show [Previous] [Next]
96
-
97
- > :first-child,
98
- > :last-child,
99
- > .previous_page,
100
- > .next_page {
101
- display: inline-block;
102
- }
103
-
104
- // sm -> md
105
- // Also show [first] [last] [current number] and [...]
106
-
107
- @include breakpoint(sm) {
108
- > :nth-child(2),
109
- > :nth-last-child(2),
110
- > .current,
111
- > .gap {
112
- display: inline-block;
113
- }
114
- }
115
-
116
- // md -> or more
117
- // Show everything
118
-
119
- @include breakpoint(md) {
120
- > * {
121
- display: inline-block;
122
- }
123
- }
124
87
  }
125
88
 
126
89
  // Unified centered pagination across the site
@@ -196,7 +196,7 @@
196
196
  // Responsive Popover
197
197
  // For < md it will show full-width anchored to the bottom
198
198
 
199
- @media (max-width: ($width-md - 0.02px)) {
199
+ @media (max-width: ($width-md - 1px)) {
200
200
  .Popover {
201
201
  position: fixed;
202
202
  top: auto !important;
@@ -386,7 +386,7 @@ $SelectMenu-max-height: 480px !default;
386
386
  //
387
387
  // Visible when a user clicks/taps on a list item
388
388
 
389
- .SelectMenu-item[aria-checked='true'] {
389
+ .SelectMenu-item[aria-checked=true] {
390
390
  font-weight: $font-weight-semibold;
391
391
  color: var(--color-fg-default);
392
392
 
@@ -402,7 +402,7 @@ $SelectMenu-max-height: 480px !default;
402
402
  // Prevent list items to be selected
403
403
 
404
404
  .SelectMenu-item:disabled,
405
- .SelectMenu-item[aria-disabled='true'] {
405
+ .SelectMenu-item[aria-disabled=true] {
406
406
  color: var(--color-primer-fg-disabled);
407
407
  pointer-events: none;
408
408
  }
@@ -1,7 +1,16 @@
1
1
  module.exports = {
2
2
  extends: ['@primer/stylelint-config'],
3
- ignoreFiles: ['**/*.js', '**/*.cjs'],
3
+ plugins: ['stylelint-scss'],
4
+ customSyntax: require('postcss-scss'),
5
+ ignoreFiles: ['src/fonts/**/*'],
4
6
  rules: {
5
- 'primer/no-override': false
7
+ 'scss/dollar-variable-default': [true, {ignore: 'local'}],
8
+ 'primer/no-override': false,
9
+ 'primer/colors': true,
10
+ 'primer/borders': true,
11
+ 'primer/spacing': true,
12
+ 'primer/typography': true,
13
+ 'primer/box-shadow': true,
14
+ 'primer/no-undefined-vars': [true, {files: 'node_modules/@primer/primitives/dist/scss/colors*/*.scss'}]
6
15
  }
7
16
  }
@@ -8,7 +8,6 @@
8
8
  /*! */ // This is a fix for a cssstats bug see https://github.com/cssstats/cssstats/issues/331
9
9
  }
10
10
  }
11
-
12
11
  @else {
13
12
  [data-color-mode="light"][data-light-theme="#{$theme-name}"],
14
13
  [data-color-mode="dark"][data-dark-theme="#{$theme-name}"] {
@@ -37,7 +36,6 @@
37
36
  @content;
38
37
  }
39
38
  }
40
-
41
39
  @else {
42
40
  [data-color-mode="light"][data-light-theme*="#{$mode}"],
43
41
  [data-color-mode="dark"][data-dark-theme*="#{$mode}"] {
@@ -86,7 +84,6 @@
86
84
  @if $type == dark {
87
85
  $dark-colors: append($dark-colors, (--color-#{$name}, #{$color}));
88
86
  }
89
-
90
87
  @else {
91
88
  $light-colors: append($light-colors, (--color-#{$name}, #{$color}));
92
89
  }
@@ -24,3 +24,19 @@
24
24
  background-color: $border;
25
25
  }
26
26
  }
27
+
28
+ // if min-width is undefined, return only min-height
29
+ @mixin minTouchTarget($min-height: 48px, $min-width: '') {
30
+ position: absolute;
31
+ top: 50%;
32
+ left: 50%;
33
+ width: 100%;
34
+ height: 100%;
35
+ min-height: $min-height;
36
+ content: '';
37
+ transform: translateX(-50%) translateY(-50%);
38
+
39
+ @if $min-width != '' {
40
+ min-width: $min-width;
41
+ }
42
+ }
@@ -47,6 +47,7 @@
47
47
 
48
48
  // 32px on desktop
49
49
  @include breakpoint(md) { font-size: $h1-size; }
50
+
50
51
  }
51
52
 
52
53
  @mixin f2-responsive {
@@ -61,6 +62,7 @@
61
62
 
62
63
  // 20px on desktop
63
64
  @include breakpoint(md) { font-size: $h3-size; }
65
+
64
66
  }
65
67
 
66
68
  // These use the mixins from above for responsive heading sizes.
@@ -68,18 +70,15 @@
68
70
  // couple the responsive font-size with the font-weight.
69
71
  @mixin h1-responsive {
70
72
  @include f1-responsive;
71
-
72
73
  font-weight: $font-weight-bold;
73
74
  }
74
75
 
75
76
  @mixin h2-responsive {
76
77
  @include f2-responsive;
77
-
78
78
  font-weight: $font-weight-bold;
79
79
  }
80
80
 
81
81
  @mixin h3-responsive {
82
82
  @include f3-responsive;
83
-
84
83
  font-weight: $font-weight-bold;
85
84
  }
@@ -178,8 +178,9 @@ $sidebar-narrow-width: (
178
178
  ) !default;
179
179
 
180
180
  $sidebar-wide-width: (
181
+ md: 296px,
181
182
  lg: 320px,
182
- xl: 336px
183
+ xl: 344px
183
184
  ) !default;
184
185
 
185
186
  $gutter: (
@@ -14,19 +14,19 @@
14
14
 
15
15
  // Hide utilities for each breakpoint
16
16
  // Each hide utility only applies to one breakpoint range.
17
- @media (max-width: $width-sm - 0.02px) {
17
+ @media (max-width: $width-sm - 1px) {
18
18
  .hide-sm {
19
19
  display: none !important;
20
20
  }
21
21
  }
22
22
 
23
- @media (min-width: $width-sm) and (max-width: $width-md - 0.02px) {
23
+ @media (min-width: $width-sm) and (max-width: $width-md - 1px) {
24
24
  .hide-md {
25
25
  display: none !important;
26
26
  }
27
27
  }
28
28
 
29
- @media (min-width: $width-md) and (max-width: $width-lg - 0.02px) {
29
+ @media (min-width: $width-md) and (max-width: $width-lg - 1px) {
30
30
  .hide-lg {
31
31
  display: none !important;
32
32
  }