Skip to content

Commit

Permalink
Merge pull request #1116 from primer/next-10
Browse files Browse the repository at this point in the history
Component refresh tweaks 10
  • Loading branch information
simurai committed Jul 1, 2020
2 parents c882f78 + 1f0d1cc commit 085a84f
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 14 deletions.
12 changes: 6 additions & 6 deletions docs/content/components/progress.md
Expand Up @@ -6,11 +6,11 @@ source: 'https://github.com/primer/css/tree/master/src/progress'
bundle: progress
---

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.
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.

```html live
<span class="Progress">
<span class="bg-green" style="width: 50%;"></span>
<span class="Progress-item bg-green" style="width: 50%;"></span>
</span>
```

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

```html live
<span class="Progress Progress--large">
<span class="bg-green" style="width: 50%;"></span>
<span class="Progress-item bg-green" style="width: 50%;"></span>
</span>
```

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

```html live
<span class="Progress Progress--small">
<span class="bg-green" style="width: 50%;"></span>
<span class="Progress-item bg-green" style="width: 50%;"></span>
</span>
```

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

Expand All @@ -52,7 +52,7 @@ In cases where it's not possible to describe the progress in text, provide an `a
```html live
<div aria-label="tasks: 8 of 10 complete">
<span class="Progress">
<span class="bg-green" style="width: 80%;"></span>
<span class="Progress-item bg-green" style="width: 80%;"></span>
</span>
</div>
```
Expand Down
1 change: 0 additions & 1 deletion docs/content/utilities/colors.mdx
Expand Up @@ -82,7 +82,6 @@ You can set the color inheritance on an element by using the `text-inherit` clas
</div>
<div class="text-green mb-2">
.text-green
<span class="tooltipped tooltipped-n" aria-label="Does not meet accessibility standards">⚠️</span>
</div>
<div class="text-purple mb-2">
.text-purple
Expand Down
6 changes: 2 additions & 4 deletions src/buttons/button.scss
Expand Up @@ -22,10 +22,6 @@
text-decoration: none;
}

&:focus {
outline: 0;
}

&:disabled,
&.disabled,
&[aria-disabled=true] {
Expand Down Expand Up @@ -109,6 +105,8 @@
// Keep :focus after :disabled. Allows to see the focus ring even on disabled buttons
&:focus,
&.focus {
outline: 1px dotted transparent; // Support Firfox custom colors
outline-offset: 2px;
box-shadow: $box-shadow-focus;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/forms/form-control.scss
Expand Up @@ -91,6 +91,7 @@ textarea.form-control {
// Custom styling for HTML5 validation bubbles (WebKit only)
::placeholder {
color: $text-gray-light;
opacity: 1; // override opacity in normalize.css
}

// Mini inputs, to match .minibutton
Expand Down
3 changes: 2 additions & 1 deletion src/labels/counters.scss
Expand Up @@ -7,11 +7,12 @@
font-size: $font-size-small;
font-weight: $font-weight-semibold;
// stylelint-disable-next-line primer/typography
line-height: $size-2;
line-height: $size-2 - 2px; // remove borders
color: $text-gray-dark;
text-align: center;
// stylelint-disable-next-line primer/colors
background-color: rgba($gray-300, 0.5);
border: $border-width $border-style transparent; // Support Firfox custom colors
// stylelint-disable-next-line primer/borders
border-radius: 2em;

Expand Down
4 changes: 4 additions & 0 deletions src/labels/diffstat.scss
Expand Up @@ -18,16 +18,20 @@
height: $spacer-2;
// stylelint-disable-next-line primer/spacing
margin-left: 1px;
outline-offset: -1px; // Support Firfox custom colors
}

.diffstat-block-deleted {
background-color: $bg-diffstat-deleted;
outline: 1px dashed transparent; // Support Firfox custom colors
}

.diffstat-block-added {
background-color: $bg-diffstat-added;
outline: 1px solid transparent; // Support Firfox custom colors
}

.diffstat-block-neutral {
background-color: $bg-diffstat-neutral;
outline: 1px dotted transparent; // Support Firfox custom colors
}
3 changes: 2 additions & 1 deletion src/labels/states.scss
Expand Up @@ -13,7 +13,7 @@
.State {
display: inline-block;
// stylelint-disable-next-line primer/spacing
padding: 6px 12px;
padding: 5px 12px;
font-size: $body-font-size;
font-weight: $font-weight-semibold;
// stylelint-disable-next-line primer/typography
Expand All @@ -23,6 +23,7 @@
white-space: nowrap;
// stylelint-disable-next-line primer/colors
background-color: $gray-500;
border: $border-width $border-style transparent; // Support Firfox custom colors
// stylelint-disable-next-line primer/borders
border-radius: 2em;
}
Expand Down
4 changes: 4 additions & 0 deletions src/navigation/underline-nav.scss
Expand Up @@ -29,6 +29,8 @@
&:focus {
text-decoration: none;
border-bottom-color: $border-gray-dark;
outline: 1px dotted transparent; // Support Firfox custom colors
outline-offset: -1px;
transition-timing-function: ease-out;
transition-duration: 0.12s;
}
Expand All @@ -39,6 +41,8 @@
font-weight: $font-weight-bold;
// stylelint-disable-next-line primer/borders
border-bottom-color: #f9826c; // custom coral
outline: 1px dotted transparent; // Support Firfox custom colors
outline-offset: -1px;

.UnderlineNav-octicon {
color: $text-gray;
Expand Down
5 changes: 5 additions & 0 deletions src/progress/progress.scss
Expand Up @@ -7,6 +7,7 @@
// stylelint-disable-next-line primer/colors
background-color: $gray-200;
border-radius: $border-radius;
outline: 1px solid transparent; // Support Firfox custom colors
}

.Progress--large {
Expand All @@ -17,6 +18,10 @@
height: 5px;
}

.Progress-item {
outline: 2px solid transparent; // Support Firfox custom colors
}

.Progress-item + .Progress-item {
// stylelint-disable-next-line primer/spacing
margin-left: 2px;
Expand Down
2 changes: 1 addition & 1 deletion src/support/variables/colors.scss
Expand Up @@ -46,7 +46,7 @@ $text-blue: $blue-500 !default;
$text-gray-dark: $gray-900 !default;
$text-gray-light: $gray-500 !default;
$text-gray: $gray-600 !default;
$text-green: $green-500 !default;
$text-green: $green-600 !default;
$text-orange: $orange-900 !default;
$text-orange-light: $orange-600 !default;
$text-purple: $purple !default;
Expand Down

0 comments on commit 085a84f

Please sign in to comment.