Skip to content

Commit 085a84f

Browse files
authored
Merge pull request #1116 from primer/next-10
Component refresh tweaks 10
2 parents c882f78 + 1f0d1cc commit 085a84f

File tree

10 files changed

+27
-14
lines changed

10 files changed

+27
-14
lines changed

docs/content/components/progress.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ source: 'https://github.com/primer/css/tree/master/src/progress'
66
bundle: progress
77
---
88

9-
Use progress components to visualize task completion. The `Progress` class adds a background color and aligns its children horizontally with flexbox. The children should be individually colored with [background utilities](/utilities/colors#background-colors) and sized with inline `width` styles in percentages. Overflow is hidden, so children that overflow will be clipped.
9+
Use progress components to visualize task completion. The `Progress` class adds a background color and aligns its children horizontally with flexbox. The children (`Progress-item`) should be individually colored with [background utilities](/utilities/colors#background-colors) and sized with inline `width` styles in percentages. Overflow is hidden, so children that overflow will be clipped.
1010

1111
```html live
1212
<span class="Progress">
13-
<span class="bg-green" style="width: 50%;"></span>
13+
<span class="Progress-item bg-green" style="width: 50%;"></span>
1414
</span>
1515
```
1616

@@ -20,7 +20,7 @@ Large progress bars are slightly taller than the default.
2020

2121
```html live
2222
<span class="Progress Progress--large">
23-
<span class="bg-green" style="width: 50%;"></span>
23+
<span class="Progress-item bg-green" style="width: 50%;"></span>
2424
</span>
2525
```
2626

@@ -30,7 +30,7 @@ Large progress bars are shorter than the default.
3030

3131
```html live
3232
<span class="Progress Progress--small">
33-
<span class="bg-green" style="width: 50%;"></span>
33+
<span class="Progress-item bg-green" style="width: 50%;"></span>
3434
</span>
3535
```
3636

@@ -41,7 +41,7 @@ For inline progress indicators, use the `Progress` and `d-inline-flex` with an i
4141
```html live
4242
<span class="text-small text-gray mr-2">4 of 16</span>
4343
<span class="Progress d-inline-flex" style="width: 160px">
44-
<div class="bg-green" style="width: 25%"></div>
44+
<div class="Progress-item bg-green" style="width: 25%"></div>
4545
</span>
4646
```
4747

@@ -52,7 +52,7 @@ In cases where it's not possible to describe the progress in text, provide an `a
5252
```html live
5353
<div aria-label="tasks: 8 of 10 complete">
5454
<span class="Progress">
55-
<span class="bg-green" style="width: 80%;"></span>
55+
<span class="Progress-item bg-green" style="width: 80%;"></span>
5656
</span>
5757
</div>
5858
```

docs/content/utilities/colors.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ You can set the color inheritance on an element by using the `text-inherit` clas
8282
</div>
8383
<div class="text-green mb-2">
8484
.text-green
85-
<span class="tooltipped tooltipped-n" aria-label="Does not meet accessibility standards">⚠️</span>
8685
</div>
8786
<div class="text-purple mb-2">
8887
.text-purple

src/buttons/button.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
text-decoration: none;
2323
}
2424

25-
&:focus {
26-
outline: 0;
27-
}
28-
2925
&:disabled,
3026
&.disabled,
3127
&[aria-disabled=true] {
@@ -109,6 +105,8 @@
109105
// Keep :focus after :disabled. Allows to see the focus ring even on disabled buttons
110106
&:focus,
111107
&.focus {
108+
outline: 1px dotted transparent; // Support Firfox custom colors
109+
outline-offset: 2px;
112110
box-shadow: $box-shadow-focus;
113111
}
114112
}

src/forms/form-control.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ textarea.form-control {
9191
// Custom styling for HTML5 validation bubbles (WebKit only)
9292
::placeholder {
9393
color: $text-gray-light;
94+
opacity: 1; // override opacity in normalize.css
9495
}
9596

9697
// Mini inputs, to match .minibutton

src/labels/counters.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
font-size: $font-size-small;
88
font-weight: $font-weight-semibold;
99
// stylelint-disable-next-line primer/typography
10-
line-height: $size-2;
10+
line-height: $size-2 - 2px; // remove borders
1111
color: $text-gray-dark;
1212
text-align: center;
1313
// stylelint-disable-next-line primer/colors
1414
background-color: rgba($gray-300, 0.5);
15+
border: $border-width $border-style transparent; // Support Firfox custom colors
1516
// stylelint-disable-next-line primer/borders
1617
border-radius: 2em;
1718

src/labels/diffstat.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,20 @@
1818
height: $spacer-2;
1919
// stylelint-disable-next-line primer/spacing
2020
margin-left: 1px;
21+
outline-offset: -1px; // Support Firfox custom colors
2122
}
2223

2324
.diffstat-block-deleted {
2425
background-color: $bg-diffstat-deleted;
26+
outline: 1px dashed transparent; // Support Firfox custom colors
2527
}
2628

2729
.diffstat-block-added {
2830
background-color: $bg-diffstat-added;
31+
outline: 1px solid transparent; // Support Firfox custom colors
2932
}
3033

3134
.diffstat-block-neutral {
3235
background-color: $bg-diffstat-neutral;
36+
outline: 1px dotted transparent; // Support Firfox custom colors
3337
}

src/labels/states.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
.State {
1414
display: inline-block;
1515
// stylelint-disable-next-line primer/spacing
16-
padding: 6px 12px;
16+
padding: 5px 12px;
1717
font-size: $body-font-size;
1818
font-weight: $font-weight-semibold;
1919
// stylelint-disable-next-line primer/typography
@@ -23,6 +23,7 @@
2323
white-space: nowrap;
2424
// stylelint-disable-next-line primer/colors
2525
background-color: $gray-500;
26+
border: $border-width $border-style transparent; // Support Firfox custom colors
2627
// stylelint-disable-next-line primer/borders
2728
border-radius: 2em;
2829
}

src/navigation/underline-nav.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
&:focus {
3030
text-decoration: none;
3131
border-bottom-color: $border-gray-dark;
32+
outline: 1px dotted transparent; // Support Firfox custom colors
33+
outline-offset: -1px;
3234
transition-timing-function: ease-out;
3335
transition-duration: 0.12s;
3436
}
@@ -39,6 +41,8 @@
3941
font-weight: $font-weight-bold;
4042
// stylelint-disable-next-line primer/borders
4143
border-bottom-color: #f9826c; // custom coral
44+
outline: 1px dotted transparent; // Support Firfox custom colors
45+
outline-offset: -1px;
4246

4347
.UnderlineNav-octicon {
4448
color: $text-gray;

src/progress/progress.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// stylelint-disable-next-line primer/colors
88
background-color: $gray-200;
99
border-radius: $border-radius;
10+
outline: 1px solid transparent; // Support Firfox custom colors
1011
}
1112

1213
.Progress--large {
@@ -17,6 +18,10 @@
1718
height: 5px;
1819
}
1920

21+
.Progress-item {
22+
outline: 2px solid transparent; // Support Firfox custom colors
23+
}
24+
2025
.Progress-item + .Progress-item {
2126
// stylelint-disable-next-line primer/spacing
2227
margin-left: 2px;

src/support/variables/colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ $text-blue: $blue-500 !default;
4646
$text-gray-dark: $gray-900 !default;
4747
$text-gray-light: $gray-500 !default;
4848
$text-gray: $gray-600 !default;
49-
$text-green: $green-500 !default;
49+
$text-green: $green-600 !default;
5050
$text-orange: $orange-900 !default;
5151
$text-orange-light: $orange-600 !default;
5252
$text-purple: $purple !default;

0 commit comments

Comments
 (0)