@primer/css 20.8.0-rc.fe3706b6 → 20.8.1-rc.5118418f

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 (100) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/alerts/flash.scss +1 -155
  3. package/autocomplete/autocomplete.scss +1 -118
  4. package/avatars/avatar-stack.scss +1 -149
  5. package/avatars/avatar.scss +1 -48
  6. package/base/normalize.scss +1 -1
  7. package/blankslate/blankslate.scss +1 -0
  8. package/blankslate/index.scss +2 -1
  9. package/box/box.scss +1 -289
  10. package/breadcrumb/breadcrumb.scss +1 -33
  11. package/dist/alerts.css +1 -1
  12. package/dist/alerts.css.map +1 -1
  13. package/dist/autocomplete.css +1 -1
  14. package/dist/autocomplete.css.map +1 -1
  15. package/dist/avatars.css +1 -1
  16. package/dist/avatars.css.map +1 -1
  17. package/dist/base.css +1 -1
  18. package/dist/base.css.map +1 -1
  19. package/dist/blankslate.css.map +1 -1
  20. package/dist/box.css +1 -1
  21. package/dist/box.css.map +1 -1
  22. package/dist/breadcrumb.css +1 -1
  23. package/dist/breadcrumb.css.map +1 -1
  24. package/dist/core.css +1 -1
  25. package/dist/core.css.map +1 -1
  26. package/dist/dropdown.css +1 -1
  27. package/dist/dropdown.css.map +1 -1
  28. package/dist/forms.css +1 -1
  29. package/dist/forms.css.map +1 -1
  30. package/dist/labels.css +1 -1
  31. package/dist/labels.css.map +1 -1
  32. package/dist/layout.css +1 -1
  33. package/dist/layout.css.map +1 -1
  34. package/dist/links.css +1 -1
  35. package/dist/links.css.map +1 -1
  36. package/dist/meta.json +219 -219
  37. package/dist/navigation.css +1 -1
  38. package/dist/navigation.css.map +1 -1
  39. package/dist/overlay.css +1 -1
  40. package/dist/overlay.css.map +1 -1
  41. package/dist/popover.css +1 -1
  42. package/dist/popover.css.map +1 -1
  43. package/dist/primer.css +2 -2
  44. package/dist/primer.css.map +1 -1
  45. package/dist/product.css +1 -1
  46. package/dist/product.css.map +1 -1
  47. package/dist/progress.css +1 -1
  48. package/dist/progress.css.map +1 -1
  49. package/dist/stats/alerts.json +1 -1
  50. package/dist/stats/autocomplete.json +1 -1
  51. package/dist/stats/avatars.json +1 -1
  52. package/dist/stats/base.json +1 -1
  53. package/dist/stats/box.json +1 -1
  54. package/dist/stats/breadcrumb.json +1 -1
  55. package/dist/stats/core.json +1 -1
  56. package/dist/stats/dropdown.json +1 -1
  57. package/dist/stats/forms.json +1 -1
  58. package/dist/stats/labels.json +1 -1
  59. package/dist/stats/layout.json +1 -1
  60. package/dist/stats/links.json +1 -1
  61. package/dist/stats/navigation.json +1 -1
  62. package/dist/stats/overlay.json +1 -1
  63. package/dist/stats/popover.json +1 -1
  64. package/dist/stats/primer.json +1 -1
  65. package/dist/stats/product.json +1 -1
  66. package/dist/stats/progress.json +1 -1
  67. package/dist/stats/subhead.json +1 -1
  68. package/dist/stats/timeline.json +1 -1
  69. package/dist/stats/toggle-switch.json +1 -1
  70. package/dist/stats/truncate.json +1 -1
  71. package/dist/subhead.css +1 -1
  72. package/dist/subhead.css.map +1 -1
  73. package/dist/timeline.css +1 -1
  74. package/dist/timeline.css.map +1 -1
  75. package/dist/toggle-switch.css +1 -1
  76. package/dist/toggle-switch.css.map +1 -1
  77. package/dist/truncate.css +1 -1
  78. package/dist/truncate.css.map +1 -1
  79. package/dropdown/dropdown.scss +1 -270
  80. package/forms/FormControl.scss +1 -677
  81. package/labels/counters.scss +1 -36
  82. package/labels/labels.scss +1 -92
  83. package/labels/states.scss +1 -56
  84. package/layout/index.scss +0 -1
  85. package/layout/layout.scss +1 -182
  86. package/layout/page-layout.scss +26 -0
  87. package/links/link.scss +1 -60
  88. package/navigation/menu.scss +1 -119
  89. package/navigation/tabnav.scss +1 -104
  90. package/navigation/underline-nav.scss +1 -136
  91. package/overlay/overlay.scss +1 -485
  92. package/package.json +2 -2
  93. package/popover/popover.scss +1 -226
  94. package/primitives/index.scss +9 -9
  95. package/progress/progress.scss +1 -27
  96. package/subhead/subhead.scss +1 -48
  97. package/timeline/timeline-item.scss +1 -94
  98. package/toggle-switch/toggle-switch.scss +1 -243
  99. package/truncate/truncate.scss +2 -61
  100. package/layout/mixins.scss +0 -105
package/CHANGELOG.md CHANGED
@@ -1,17 +1,43 @@
1
1
  # @primer/css
2
2
 
3
+ ## 20.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2351](https://github.com/primer/css/pull/2351) [`1b6694c4`](https://github.com/primer/css/commit/1b6694c40903eae4e107cd9d59faf5020a42f944) Thanks [@jonrohan](https://github.com/jonrohan)! - Updating to primer view components 0.0.117
8
+
3
9
  ## 20.8.0
4
10
 
5
11
  ### Minor Changes
6
12
 
13
+ - [`d7a4c343`](https://github.com/primer/css/commit/d7a4c343ab1bc0d7f55ff85d735c93d9825419ae) Thanks [@jonrohan](https://github.com/jonrohan)! - Importing more styles from Primer View Components
14
+
15
+ - https://github.com/primer/view_components/pull/1587
16
+ - https://github.com/primer/view_components/pull/1590
17
+ - https://github.com/primer/view_components/pull/1592
18
+ - https://github.com/primer/view_components/pull/1593
19
+ - https://github.com/primer/view_components/pull/1594
20
+ - https://github.com/primer/view_components/pull/1598
21
+ - https://github.com/primer/view_components/pull/1599
22
+ - https://github.com/primer/view_components/pull/1600
23
+ - https://github.com/primer/view_components/pull/1601
24
+ - https://github.com/primer/view_components/pull/1607
25
+ - https://github.com/primer/view_components/pull/1609
26
+ - https://github.com/primer/view_components/pull/1618
27
+ - https://github.com/primer/view_components/pull/1626
28
+
7
29
  - [#2318](https://github.com/primer/css/pull/2318) [`aee4b6f5`](https://github.com/primer/css/commit/aee4b6f571d88f391fcf98170857c4eed7b1ae82) Thanks [@jonrohan](https://github.com/jonrohan)! - Import blankslate styles from primer/view-components
8
30
 
9
31
  ### Patch Changes
10
32
 
33
+ - [#2309](https://github.com/primer/css/pull/2309) [`f76e7858`](https://github.com/primer/css/commit/f76e785807d9c9c64530201f858798e67668afe2) Thanks [@jdanyow](https://github.com/jdanyow)! - Use `--color-fg-default` for `mark`
34
+
11
35
  - [#2330](https://github.com/primer/css/pull/2330) [`83250f82`](https://github.com/primer/css/commit/83250f82751092cc9ad3a8fb46262a0f0f2a3a96) Thanks [@stevenlaidlaw](https://github.com/stevenlaidlaw)! - Fix collapsing spaces within inline code blocks
12
36
 
13
37
  - [#2327](https://github.com/primer/css/pull/2327) [`8cf13e98`](https://github.com/primer/css/commit/8cf13e984ca27a286a706fd2b7243980d3de7985) Thanks [@simurai](https://github.com/simurai)! - Move `fieldset` + `label` styles to `base.scss`
14
38
 
39
+ - [#2340](https://github.com/primer/css/pull/2340) [`ecbcbb1b`](https://github.com/primer/css/commit/ecbcbb1b04e72fc2006be7ea8211aae0732d3530) Thanks [@simurai](https://github.com/simurai)! - Import `Layout` from PVC
40
+
15
41
  ## 20.7.1
16
42
 
17
43
  ### Patch Changes
package/alerts/flash.scss CHANGED
@@ -1,155 +1 @@
1
- // stylelint-disable selector-max-type, no-duplicate-selectors
2
-
3
- // Default flash
4
- .flash:not(.Banner) {
5
- position: relative;
6
- // stylelint-disable-next-line primer/spacing
7
- padding: 20px $spacer-3;
8
- border-style: $border-style;
9
- border-width: $border-width;
10
- border-radius: $border-radius;
11
-
12
- p:last-child {
13
- margin-bottom: 0;
14
- }
15
-
16
- .octicon {
17
- // stylelint-disable-next-line primer/spacing
18
- margin-right: 12px;
19
- }
20
- }
21
-
22
- // Contain the flash messages
23
- .flash-messages {
24
- margin-bottom: $spacer-4;
25
- }
26
-
27
- // Close button
28
- .flash-close:not(.Banner-close) {
29
- float: right;
30
- padding: $spacer-3;
31
- margin: -$spacer-3;
32
- text-align: center;
33
- cursor: pointer;
34
-
35
- // Undo `<button>` styles
36
- background: none;
37
- border: 0;
38
- appearance: none;
39
-
40
- &:hover {
41
- opacity: 0.7;
42
- }
43
-
44
- &:active {
45
- opacity: 0.5;
46
- }
47
-
48
- .octicon {
49
- margin-right: 0;
50
- }
51
- }
52
-
53
- // Action button
54
- .flash-action:not(.Banner-actions) {
55
- float: right;
56
- // stylelint-disable-next-line primer/spacing
57
- margin-top: -3px;
58
- margin-left: $spacer-4;
59
- background-clip: padding-box;
60
-
61
- &.btn .octicon {
62
- margin-right: $spacer-1;
63
- color: var(--color-fg-muted);
64
- }
65
-
66
- &.btn-primary {
67
- background-clip: border-box;
68
-
69
- .octicon {
70
- color: inherit;
71
- }
72
- }
73
- }
74
-
75
- //
76
- // Color variations
77
- //
78
-
79
- .flash:not(.Banner) {
80
- color: var(--color-fg-default);
81
- background-image: linear-gradient(var(--color-accent-subtle), var(--color-accent-subtle));
82
- border-color: var(--color-accent-muted);
83
-
84
- .octicon {
85
- color: var(--color-accent-fg);
86
- }
87
- }
88
-
89
- .flash-warn:not(.Banner) {
90
- color: var(--color-fg-default);
91
- background-image: linear-gradient(var(--color-attention-subtle), var(--color-attention-subtle));
92
- border-color: var(--color-attention-muted);
93
-
94
- .octicon {
95
- color: var(--color-attention-fg);
96
- }
97
- }
98
-
99
- .flash-error:not(.Banner) {
100
- color: var(--color-fg-default);
101
- background-image: linear-gradient(var(--color-danger-subtle), var(--color-danger-subtle));
102
- border-color: var(--color-danger-muted);
103
-
104
- .octicon {
105
- color: var(--color-danger-fg);
106
- }
107
- }
108
-
109
- .flash-success:not(.Banner) {
110
- color: var(--color-fg-default);
111
- background-image: linear-gradient(var(--color-success-subtle), var(--color-success-subtle));
112
- border-color: var(--color-success-muted);
113
-
114
- .octicon {
115
- color: var(--color-success-fg);
116
- }
117
- }
118
-
119
- //
120
- // Layout variations
121
- //
122
-
123
- .flash-full:not(.Banner) {
124
- // stylelint-disable-next-line primer/spacing
125
- margin-top: -1px;
126
- border-width: $border-width 0;
127
- border-radius: 0;
128
- }
129
-
130
- // A banner rendered at the top of the page.
131
- .flash-banner {
132
- position: fixed;
133
- top: 0;
134
- z-index: 90;
135
- width: 100%;
136
- border-top: 0;
137
- border-right: 0;
138
- border-left: 0;
139
- border-radius: 0;
140
- }
141
-
142
- // Makes sure the background is opaque to cover any content underneath
143
- .flash-full,
144
- .flash-banner {
145
- background-color: var(--color-canvas-default);
146
- }
147
-
148
- // FIXME deprecate this
149
- .warning {
150
- padding: $em-spacer-5;
151
- // stylelint-disable-next-line primer/spacing
152
- margin-bottom: 0.8em;
153
- font-weight: $font-weight-bold;
154
- background-color: var(--color-attention-subtle);
155
- }
1
+ @import '@primer/view-components/app/components/primer/beta/flash';
@@ -1,118 +1 @@
1
- // This file can be deprecated when AutoComplete is upstreamed to PVC + rolled out to dotcom https://github.com/github/primer/issues/796
2
- // AutoComplete relies on FormControl, Overlay and ActionList CSS
3
-
4
- // Stacked label (default)
5
- .autocomplete-label-stacked {
6
- display: block;
7
- margin-bottom: $spacer-2 * 0.75;
8
- }
9
-
10
- // Inline label (non-default)
11
- .autocomplete-label-inline {
12
- display: inline;
13
- margin-right: $spacer-2 * 0.75;
14
- }
15
-
16
- // Switch to stacked at smaller viewport
17
- @media (max-width: $width-sm) {
18
- .autocomplete-label-inline {
19
- display: block;
20
- margin-bottom: $spacer-2 * 0.75;
21
- }
22
- }
23
-
24
- // Wrapper for the input and result elements to ensure alignment
25
- .autocomplete-body {
26
- position: relative;
27
- display: inline;
28
- }
29
-
30
- // Wrapper and conditional styles for when an icon is added
31
- .autocomplete-embedded-icon-wrap {
32
- display: inline-flex;
33
- padding: $spacer-1 $spacer-2;
34
- align-items: center;
35
-
36
- &:focus-within {
37
- border-color: var(--color-accent-fg);
38
-
39
- @include focusBoxShadowInset;
40
- }
41
-
42
- .form-control {
43
- padding: 0;
44
- margin-left: $spacer-2;
45
- // stylelint-disable-next-line
46
- border: none;
47
- box-shadow: none;
48
-
49
- &:focus {
50
- box-shadow: none;
51
- }
52
-
53
- &:focus-visible {
54
- box-shadow: none;
55
- }
56
- }
57
- }
58
-
59
- // A pop up list of items used to show autocompleted results
60
- .autocomplete-results {
61
- position: absolute;
62
- left: 0;
63
- z-index: 99;
64
- width: max-content;
65
- min-width: 100%;
66
- max-height: 20em;
67
- overflow-y: auto;
68
- // stylelint-disable-next-line primer/typography
69
- font-size: 13px;
70
- list-style: none;
71
- background: var(--color-canvas-overlay);
72
- border: $border-width $border-style var(--color-border-default);
73
- border-radius: $border-radius;
74
- box-shadow: var(--color-shadow-medium);
75
- }
76
-
77
- // One of the items that appears within an autocomplete group
78
- // Bold black text on white background
79
-
80
- .autocomplete-item {
81
- display: block;
82
- width: 100%;
83
- padding: $spacer-1 $spacer-2;
84
- overflow: hidden;
85
- font-weight: $font-weight-bold;
86
- color: var(--color-fg-default);
87
- text-align: left;
88
- text-decoration: none;
89
- text-overflow: ellipsis;
90
- white-space: nowrap;
91
- cursor: pointer;
92
- background-color: var(--color-canvas-overlay);
93
- border: 0;
94
-
95
- &:hover {
96
- color: var(--color-fg-on-emphasis);
97
- text-decoration: none;
98
- background-color: var(--color-accent-emphasis);
99
-
100
- // Inherit color on all child elements to ensure enough contrast
101
- * {
102
- color: inherit !important;
103
- }
104
- }
105
-
106
- &.selected,
107
- &[aria-selected='true'],
108
- &.navigation-focus {
109
- color: var(--color-fg-on-emphasis);
110
- text-decoration: none;
111
- background-color: var(--color-accent-emphasis);
112
-
113
- // Inherit color on all child elements to ensure enough contrast
114
- * {
115
- color: inherit !important;
116
- }
117
- }
118
- }
1
+ @import '@primer/view-components/app/components/primer/alpha/auto_complete';
@@ -1,149 +1 @@
1
- // Stacked avatars can be used to show who is participating in thread when
2
- // there is limited space available.
3
-
4
- .AvatarStack {
5
- position: relative;
6
- min-width: 26px;
7
- height: 20px;
8
-
9
- .AvatarStack-body {
10
- position: absolute;
11
- }
12
-
13
- &.AvatarStack--two {
14
- min-width: 36px;
15
- }
16
-
17
- &.AvatarStack--three-plus {
18
- min-width: 46px;
19
- }
20
- }
21
-
22
- .AvatarStack-body {
23
- display: flex;
24
- background: var(--color-canvas-default);
25
- // stylelint-disable-next-line primer/borders
26
- border-radius: 100px;
27
-
28
- .avatar {
29
- position: relative;
30
- z-index: 2;
31
- display: flex;
32
- width: 20px;
33
- height: 20px;
34
- box-sizing: content-box;
35
- // stylelint-disable-next-line primer/spacing
36
- margin-right: -11px;
37
- background-color: var(--color-canvas-default);
38
- border-right: $border-width $border-style var(--color-canvas-default);
39
- // stylelint-disable-next-line primer/borders
40
- border-radius: $border-radius-1;
41
- box-shadow: none;
42
- transition: margin 0.1s ease-in-out;
43
-
44
- &:first-child {
45
- z-index: 3;
46
- }
47
-
48
- &:last-child {
49
- z-index: 1;
50
- border-right: 0;
51
- }
52
-
53
- // stylelint-disable selector-max-type
54
- img {
55
- // stylelint-disable-next-line primer/borders
56
- border-radius: $border-radius-1;
57
- }
58
- // stylelint-enable selector-max-type
59
-
60
- // Account for 4+ avatars
61
- &:nth-child(n + 4) {
62
- display: none;
63
- opacity: 0;
64
- }
65
- }
66
-
67
- &:hover {
68
- .avatar {
69
- // stylelint-disable-next-line primer/spacing
70
- margin-right: 3px;
71
- }
72
-
73
- .avatar:nth-child(n + 4) {
74
- display: flex;
75
- opacity: 1;
76
- }
77
-
78
- .avatar-more {
79
- display: none !important;
80
- }
81
- }
82
- }
83
-
84
- .avatar.avatar-more {
85
- z-index: 1;
86
- margin-right: 0;
87
- background: var(--color-canvas-subtle);
88
-
89
- &::before,
90
- &::after {
91
- position: absolute;
92
- display: block;
93
- height: 20px;
94
- content: '';
95
- // stylelint-disable-next-line primer/borders
96
- border-radius: 2px;
97
- outline: $border-width $border-style var(--color-canvas-default);
98
- }
99
-
100
- &::before {
101
- width: 17px;
102
- background: var(--color-avatar-stack-fade-more);
103
- }
104
-
105
- &::after {
106
- width: 14px;
107
- background: var(--color-avatar-stack-fade);
108
- }
109
- }
110
-
111
- // Right aligned variation
112
-
113
- .AvatarStack--right {
114
- .AvatarStack-body {
115
- right: 0;
116
- flex-direction: row-reverse;
117
-
118
- &:hover .avatar {
119
- margin-right: 0;
120
- // stylelint-disable-next-line primer/spacing
121
- margin-left: 3px;
122
- }
123
-
124
- .avatar:not(:last-child) {
125
- border-left: 0;
126
- }
127
- }
128
-
129
- .avatar.avatar-more {
130
- background: var(--color-avatar-stack-fade);
131
-
132
- &::before {
133
- width: 5px;
134
- }
135
-
136
- &::after {
137
- width: 2px;
138
- background: var(--color-canvas-subtle);
139
- }
140
- }
141
-
142
- .avatar {
143
- margin-right: 0;
144
- // stylelint-disable-next-line primer/spacing
145
- margin-left: -11px;
146
- border-right: 0;
147
- border-left: $border-width $border-style var(--color-canvas-default);
148
- }
149
- }
1
+ @import '@primer/view-components/app/components/primer/beta/avatar_stack';
@@ -1,48 +1 @@
1
- .avatar {
2
- display: inline-block;
3
- overflow: hidden; // Ensure page layout in Firefox should images fail to load
4
- line-height: $lh-condensed-ultra;
5
- vertical-align: middle;
6
- background-color: var(--color-avatar-bg); // adds opaque bg to transparent avatars
7
- border-radius: $border-radius;
8
- flex-shrink: 0;
9
- // stylelint-disable-next-line primer/box-shadow
10
- box-shadow: 0 0 0 1px var(--color-avatar-border);
11
- }
12
-
13
- .avatar-link {
14
- float: left;
15
- line-height: $lh-condensed-ultra;
16
- }
17
-
18
- // User for example on /stars and /user for grids of avatars
19
- .avatar-group-item {
20
- display: inline-block;
21
- // stylelint-disable-next-line primer/spacing
22
- margin-bottom: 3px;
23
- }
24
-
25
- // Border radius
26
-
27
- .avatar-1,
28
- .avatar-2,
29
- .avatar-small {
30
- // stylelint-disable-next-line primer/borders
31
- border-radius: $border-radius-1;
32
- }
33
-
34
- // Sizes
35
-
36
- @mixin avatar-size( $size ) {
37
- width: $size;
38
- height: $size;
39
- }
40
-
41
- .avatar-1 { @include avatar-size( $size-1 ); }
42
- .avatar-2 { @include avatar-size( $size-2 ); }
43
- .avatar-3 { @include avatar-size( $size-3 ); }
44
- .avatar-4 { @include avatar-size( $size-4 ); }
45
- .avatar-5 { @include avatar-size( $size-5 ); }
46
- .avatar-6 { @include avatar-size( $size-6 ); }
47
- .avatar-7 { @include avatar-size( $size-7 ); }
48
- .avatar-8 { @include avatar-size( $size-8 ); }
1
+ @import '@primer/view-components/app/components/primer/beta/avatar';
@@ -153,7 +153,7 @@ h1 {
153
153
 
154
154
  mark {
155
155
  background-color: var(--color-attention-subtle);
156
- color: var(--color-text-primary);
156
+ color: var(--color-fg-default);
157
157
  }
158
158
 
159
159
  /**
@@ -0,0 +1 @@
1
+ @import '@primer/view-components/app/components/primer/beta/blankslate';
@@ -1 +1,2 @@
1
- @import '@primer/view-components/app/components/primer/beta/blankslate';
1
+ @import '../support/index.scss';
2
+ @import './blankslate.scss';