Skip to content

Commit 42ebe55

Browse files
authored
Merge branch 'main' into hpalacio/ol_type
2 parents 3dfb910 + 3a2cb71 commit 42ebe55

File tree

13 files changed

+108
-102
lines changed

13 files changed

+108
-102
lines changed

.changeset/tiny-mangos-breathe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/css': major
3+
---
4+
5+
Remove dependency on primer/octicons and force overflow visible

.github/workflows/release_canary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5757

5858
- name: Output canary version number
59-
uses: actions/github-script@v3
59+
uses: actions/github-script@v4.0.2
6060
with:
6161
script: |
6262
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)

.github/workflows/release_candidate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4343

4444
- name: Output candidate version number
45-
uses: actions/github-script@v3
45+
uses: actions/github-script@v4.0.2
4646
with:
4747
script: |
4848
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)

.github/workflows/triage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Semantic Version Label
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/github-script@v3
12+
- uses: actions/github-script@v4.0.2
1313
id: version-result
1414
with:
1515
github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -22,7 +22,7 @@ jobs:
2222
return match[0][1]
2323
}
2424
25-
- uses: actions/github-script@v3
25+
- uses: actions/github-script@v4.0.2
2626
env:
2727
RELEASE: ${{ steps.version-result.outputs.result }}
2828
with:

deprecations.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,8 @@
66
const versionDeprecations = {
77
'17.0.0': [
88
{
9-
selectors: [
10-
'.btn-mktg[aria-disabled=true]',
11-
'.btn-primary-mktg[aria-disabled=true]',
12-
'.btn-outline-mktg[aria-disabled=true]',
13-
'.btn-transparent[aria-disabled=true]',
14-
'.btn-large-mktg'
15-
],
16-
message: 'Removing marketing buttons'
9+
selectors: ['.btn-large-mktg'],
10+
message: `Please use the ".btn-lg-mktg" class instead of "btn-large-mktg".`
1711
},
1812
{
1913
selectors: [':-ms-input-placeholder'],

docs/content/components/buttons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Use `.btn-large` with a type scale utility to transform the text to a bigger siz
105105

106106
```html live
107107
<div class="f3">
108-
<button class="btn btn-large btn-outline-blue mr-2" type="button">Large button button</button>
108+
<button class="btn btn-large btn-outline mr-2" type="button">Large button button</button>
109109
<a class="btn btn-large" href="#url" role="button">Large link button</a>
110110
</div>
111111
```

docs/content/components/links.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,42 @@ bundle: links
1010
Please note Primer v16 has changed the naming of these color classes. Check the <a href="/css/support/v16-migration">migration guide</a> to make sure your app is up to date.
1111
</Note>
1212

13-
By default `<a>` elements already use the right link color and apply an underline on hover.
13+
By default `<a>` elements already use the right link color and apply an underline on hover. So in most cases the `.Link` class is not really needed.
1414

1515
```html live
16-
Some text with a default <a href="#url">link</a>
17-
```
18-
19-
If you need to make other elements behave like a link and perhaps use JS to trigger navigating to another page, use the `.Link` class.
20-
21-
```html live
22-
Some text with a <span class="Link">span that behaves like a link</span>
16+
Some text with a <a href="#url">link</a>
17+
Some text with a <a href="#url" class="Link">link</a>
2318
```
2419

2520
If you like to override the default link styles you can do so with the following link utilities. **Bear in mind that link styles are easier for more people to see and interact with when the changes in styles do not rely on color alone.**
2621

22+
## Primary link
23+
2724
Use `.Link--primary` to turn the link color to blue only on hover.
2825

2926
```html live
3027
<p class="color-text-secondary">Some text with a <a class="Link--primary" href="#url">Link--primary</a></p>
3128
```
3229

30+
## Secondary link
31+
3332
Use `.Link--secondary` for a more subtle link color that turns blue on hover.
3433

3534
```html live
3635
Some text with a <a class="Link--secondary" href="#url">Link--secondary</a>
3736
```
3837

38+
## Muted link
39+
3940
Use `.Link--muted` also removes the underline on hover. Tip: You can also use the `.no-underline` utility to do the same for `.Link--primary`.
4041

4142
```html live
4243
<p>Some text with a <a class="Link--secondary no-underline" href="#url">Link--muted</a></p>
4344
<p>Some text with a <a class="Link--primary no-underline" href="#url">Link--primary no-underline</a></p>
4445
```
4546

47+
## On hover link
48+
4649
Use `.Link--onHover` to make any text color used with links to turn blue on hover. This is useful when you want only part of a link to turn blue on hover.
4750

4851
```html live
@@ -51,6 +54,18 @@ Use `.Link--onHover` to make any text color used with links to turn blue on hove
5154
</a>
5255
```
5356

57+
## Nested link
58+
59+
The `.Link` class can be nested inside an `<a>` element if only part of it should be styled like a link.
60+
61+
```html live
62+
<a class="color-text-primary no-underline" href="#url">
63+
A nested <span class="Link">Link</span>
64+
</a>
65+
```
66+
67+
## Link and color utilities
68+
5469
Link classes in combination with [color utilities](../utilities/colors) lets you colorize information separately inside of a link but have all of the link turn into one color on hover.
5570

5671
```html live

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"release": "changeset publish"
3131
},
3232
"dependencies": {
33-
"@primer/octicons": "13.0.0",
3433
"@primer/primitives": "4.3.0"
3534
},
3635
"devDependencies": {
@@ -39,28 +38,28 @@
3938
"@github/prettier-config": "0.0.4",
4039
"autoprefixer": "10.2.5",
4140
"cssstats": "4.0.2",
42-
"eslint": "7.24.0",
41+
"eslint": "7.25.0",
4342
"eslint-plugin-github": "4.1.3",
44-
"eslint-plugin-jest": "24.3.5",
43+
"eslint-plugin-jest": "24.3.6",
4544
"eslint-plugin-prettier": "3.4.0",
46-
"filesize": "6.2.5",
45+
"filesize": "6.3.0",
4746
"front-matter": "4.0.2",
4847
"fs-extra": "9.1.0",
4948
"globby": "11.0.3",
5049
"jest": "26.6.3",
5150
"js-yaml": "4.1.0",
52-
"postcss": "8.2.10",
51+
"postcss": "8.2.12",
5352
"postcss-import": "14.0.1",
5453
"postcss-load-config": "3.0.1",
5554
"postcss-node-sass": "3.1.0",
5655
"postcss-scss": "3.0.5",
5756
"postcss-simple-vars": "6.0.3",
5857
"prettier": "2.2.1",
5958
"semver": "7.3.5",
60-
"stylelint": "13.12.0",
59+
"stylelint": "13.13.0",
6160
"stylelint-config-primer": "11.0.1",
6261
"stylelint-scss": "3.19.0",
63-
"table": "6.3.0"
62+
"table": "6.5.1"
6463
},
6564
"jest": {
6665
"testEnvironment": "node",

src/base/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
@import "./base.scss";
66
@import "./kbd.scss";
77
@import "./typography-base.scss";
8+
@import "./octicons.scss";

src/base/octicons.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.octicon {
2+
display: inline-block;
3+
overflow: visible !important;
4+
vertical-align: text-bottom;
5+
fill: currentColor;
6+
}

0 commit comments

Comments
 (0)