Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primer 14.2.0 #1017

Merged
merged 41 commits into from
Jan 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a864a17
fixes #790
Nov 12, 2019
6fedc64
Update Inter Regular and Semibold to v3.11
simurai Dec 18, 2019
ebc4019
Add Inter Bold
simurai Dec 18, 2019
9f68433
Generate all spacers
simurai Dec 20, 2019
58033cb
rm flash-banner docs (component was deprecated)
ktravers Dec 20, 2019
f7c1d16
Add .selected back to the .UnderlineNav
simurai Dec 26, 2019
f63d53c
Add support for using <button>s
simurai Dec 26, 2019
09f3191
Use aria for selected/current states
simurai Dec 26, 2019
aabf15b
Lint
simurai Dec 26, 2019
277b968
Merge pull request #982 from flavianunes/master
simurai Dec 26, 2019
5e79422
Format
simurai Dec 26, 2019
a863911
Add aria-current=page selector to breadcrumbs
simurai Dec 27, 2019
d58bac3
Add support for aria-current=page to tabnav
simurai Dec 27, 2019
b0afc6d
Add aria-current="page" selector to menu
simurai Dec 27, 2019
6cea240
Add aria-current="page" to filter-list
simurai Dec 27, 2019
838b93a
Add aria-current="page" to subnav
simurai Dec 27, 2019
f83b2c0
Add aria-current="page" to pagination
simurai Dec 27, 2019
9cb14f8
Remove value for aria-current on breadcrumbs
simurai Dec 27, 2019
77ae07e
Fix link to "spacing scale"
simurai Jan 3, 2020
e20330c
Improve padding docs
simurai Jan 3, 2020
fd9a278
Fix more links
simurai Jan 3, 2020
a523e34
Simplify marketing padding utilities
simurai Jan 3, 2020
628e4e2
Improve margin docs
simurai Jan 3, 2020
04fd885
Simplify marketing margin
simurai Jan 3, 2020
64e0f95
Mention exception
simurai Jan 3, 2020
9afed8f
Remove /css from links
simurai Jan 3, 2020
24fd50a
Add aria-disabled=true
simurai Jan 3, 2020
4abeaec
Use aria-disabled="true"
simurai Jan 3, 2020
023df92
npm version minor
simurai Jan 23, 2020
ddab1ce
Merge pull request #1004 from ktravers/rm-flash-banner
simurai Jan 23, 2020
05d33a9
Merge pull request #1013 from primer/fix-links
simurai Jan 23, 2020
c8510ae
Merge pull request #1012 from primer/padding
simurai Jan 23, 2020
44940ef
Merge pull request #1001 from primer/inter-bold
simurai Jan 23, 2020
9254778
Merge pull request #1014 from primer/aria-disabled
simurai Jan 23, 2020
c5a0549
Merge pull request #1005 from primer/underline-nav-selected
simurai Jan 23, 2020
0660377
Merge branch 'release-14.2.0' into aria-selected
simurai Jan 23, 2020
e016bea
Merge pull request #1006 from primer/aria-selected
simurai Jan 23, 2020
f914053
Merge pull request #1002 from primer/marketing-utilities
simurai Jan 23, 2020
9b5fdbc
Fix "test deprecations"
simurai Jan 23, 2020
89ff9b5
Update CHANGELOG.md
simurai Jan 23, 2020
adee9c7
Fix links
simurai Jan 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## 14.2.0

### :rocket: Enhancements
- [#1006](https://github.com/primer/css/pull/1006) Use ARIA attributes for states
- [#1014](https://github.com/primer/css/pull/1014) Add aria-disabled state
- [#1001](https://github.com/primer/css/pull/1001) Add Inter bold font file
- [#982](https://github.com/primer/css/pull/982) Applies .selected styles to [aria-selected=true]

### :bug: Bug fixes
- [#1002](https://github.com/primer/css/pull/1002) Fix marketing utilities
- [#1005](https://github.com/primer/css/pull/1005) Add .selected back to the .UnderlineNav

### :memo: Documentation
- [#1012](https://github.com/primer/css/pull/1012) Improve margin/padding docs
- [#1013](https://github.com/primer/css/pull/1013) Fix docs links
- [#1004](https://github.com/primer/css/pull/1004) rm deprecated flash-banner component from docs

### Committers
- [@flavianunes](https://github.com/flavianunes)
- [@ktravers](https://github.com/ktravers)
- [@simurai](https://github.com/simurai)

## 14.1.0

### :rocket: Enhancements
- [#994](https://github.com/primer/css/pull/994) Responsive line-height utilities
- [#995](https://github.com/primer/css/pull/995) Add bold weight to marketing font variables
Expand Down
11 changes: 11 additions & 0 deletions deprecations.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
* array and a "message" string.
*/
const versionDeprecations = {
'14.2.0': [
{
selectors: [
'.subnav-item.selected:hover',
'.subnav-item.selected:focus',
'.autocomplete-item[aria-selected="true"]',
'.autocomplete-item[aria-selected="true"] *'
],
message: `These selectors are not needed anymore.`
}
],
'14.0.0': [
{
selectors: [
Expand Down
6 changes: 3 additions & 3 deletions docs/content/components/box.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ Use `Counter--gray-dark` for a counter with a dark gray background and white tex

To achieve different layouts when adding buttons or form elements to boxes we suggest you use utilities to achieve the layout you want. Here's some common examples:

Use [flexbox utilities](/css/utilities/flexbox) to center align items, and avoid using floats by using `flex-auto` to have the text fill the remaining space so that the button rests on the far right.
Use [flexbox utilities](/utilities/flexbox) to center align items, and avoid using floats by using `flex-auto` to have the text fill the remaining space so that the button rests on the far right.

```html live
<div class="Box Box--condensed">
Expand Down Expand Up @@ -554,7 +554,7 @@ You can put forms in boxes. Often form submission buttons are aligned to the bot
</div>
```

When a box is all by itself centered on a page you can use [column widths](/css/objects/grid) to control the width of the box. If needed, break the mold a little and use [typography utilities](/css/utilities/typography) instead of the built in box title styles.
When a box is all by itself centered on a page you can use [column widths](/objects/grid) to control the width of the box. If needed, break the mold a little and use [typography utilities](/utilities/typography) instead of the built in box title styles.

```html live
<div class="Box Box--spacious col-6 mx-auto text-center">
Expand All @@ -575,4 +575,4 @@ When a box is all by itself centered on a page you can use [column widths](/css/
</div>
```

Box patterns can also be made with, and modified with [border utilities](/css/utilities/borders).
Box patterns can also be made with, and modified with [border utilities](/utilities/borders).
6 changes: 3 additions & 3 deletions docs/content/components/breadcrumb.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Breadcrumbs are used to show taxonomical context on pages that are many levels d
```html live
<nav aria-label="Breadcrumb">
<ol>
<li class="breadcrumb-item text-small"><a href="https://github.com/business">Business</a></li>
<li class="breadcrumb-item text-small"><a href="https://github.com/business/customers">Customers</a></li>
<li class="breadcrumb-item breadcrumb-item-selected text-small text-gray" aria-current="page">MailChimp</li>
<li class="breadcrumb-item"><a href="https://github.com/business">Business</a></li>
<li class="breadcrumb-item"><a href="https://github.com/business/customers">Customers</a></li>
<li class="breadcrumb-item" aria-current="page">MailChimp</li>
</ol>
</nav>
```
18 changes: 9 additions & 9 deletions docs/content/components/buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,28 @@ Use `.btn-large` with a type scale utility to transform the text to a bigger siz

## Disabled state

Disable `<button>` elements with the boolean `disabled` attribute and `<a>` elements with the `.disabled` class.
Disable `<button>` and `<a>` elements with the `aria-disabled="true"` attribute.

```html live
<button class="btn mr-2" type="button" disabled>Disabled button</button>
<a class="btn disabled" href="#url" role="button">Disabled button</a>
<button class="btn mr-2" type="button" aria-disabled="true">Disabled button</button>
<a class="btn" href="#url" role="button" aria-disabled="true">Disabled button</a>
```

Similar styles are applied to primary, danger, and outline buttons:

```html live
<button class="btn btn-primary mr-2" type="button" disabled>Disabled button</button>
<a class="btn btn-primary disabled" href="#url" role="button">Disabled button</a>
<button class="btn btn-primary mr-2" type="button" aria-disabled="true">Disabled button</button>
<a class="btn btn-primary" href="#url" role="button" aria-disabled="true">Disabled button</a>
```

```html live
<button class="btn btn-danger mr-2" type="button" disabled>Disabled button</button>
<a class="btn btn-danger disabled" href="#url" role="button">Disabled button</a>
<button class="btn btn-danger mr-2" type="button" aria-disabled="true">Disabled button</button>
<a class="btn btn-danger" href="#url" role="button" aria-disabled="true">Disabled button</a>
```

```html live
<button class="btn btn-outline mr-2" type="button" disabled>Disabled button</button>
<a class="btn btn-outline disabled" href="#url" role="button">Disabled button</a>
<button class="btn btn-outline mr-2" type="button" aria-disabled="true">Disabled button</button>
<a class="btn btn-outline" href="#url" role="button" aria-disabled="true">Disabled button</a>
```

## Block button
Expand Down
21 changes: 0 additions & 21 deletions docs/content/components/flash-banner.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/content/components/labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Use the `Counter` in navigation to indicate the number of items without the user
```html live title="Counter in tabs"
<div class="tabnav">
<nav class="tabnav-tabs" aria-label="Foo bar">
<a href="#url" class="tabnav-tab selected" aria-current="page">Foo tab <span class="Counter">23</a>
<a href="#url" class="tabnav-tab" aria-current="page">Foo tab <span class="Counter">23</a>
<a href="#url" class="tabnav-tab">Bar tab</a>
</nav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/content/components/loaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ It can also be used in combination with other components.
<h2><span>Loading</span><span class="AnimatedEllipsis"></span></h2>
<span class="branch-name mt-2"><span>Loading</span><span class="AnimatedEllipsis"></span></span><br>
<span class="Label bg-blue mt-3"><span>Loading</span><span class="AnimatedEllipsis"></span></span><br>
<button class="btn mt-3" disabled><span>Loading</span><span class="AnimatedEllipsis"></span></button>
<button class="btn mt-3" aria-disabled="true"><span>Loading</span><span class="AnimatedEllipsis"></span></button>
```
Loading