Skip to content

Commit

Permalink
Updating and autofixing stylelint (#1765)
Browse files Browse the repository at this point in the history
* Updating and autofixing stylelint

* Moving config to primer/stylelint-config

* Removing unused disables from css

* Stylelint auto-fixes

* @primer/stylelint-config@12.2.0

* Remove these from workfow

* Use reusable release_canary workflow (#1811)

* Use reusable release_canary workflow

* Install with yarn

Co-authored-by: Jon Rohan <yes@jonrohan.codes>

* Use counter-border for LHC (#1792)

* Use counter-border for LHC

* Create orange-ties-sin.md

* Remove fallback

* UnderlineNav `:focus` styles (#1764)

* add pseudo selectors

* adjustments

* add stories, cleanup

* update mixin

* fix mixin

* lint

* add back overflow styles

* adjust focus for better overflow state, scrollsnap

* post test adjustments, move hacks to primer css

* Stylelint auto-fixes

* hover state desktop only

* document data-content hack

* Create nice-days-jog.md

Co-authored-by: Actions Auto Build <actions@github.com>
Co-authored-by: simurai <simurai@github.com>

* Add note about loading the "latest" Primer CSS version (#1784)

* Add stashing

* Stylelint auto-fixes

Co-authored-by: Actions Auto Build <actions@github.com>
Co-authored-by: Cole Bemis <colebemis@github.com>
Co-authored-by: simurai <simurai@github.com>
Co-authored-by: Katie Langerman <langermank@github.com>
  • Loading branch information
5 people committed Dec 8, 2021
1 parent ef2f3f0 commit e8d5402
Show file tree
Hide file tree
Showing 39 changed files with 81 additions and 77 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ jobs:
if [ $? -eq 0 ]
then
set -e
git stash
git remote update
git fetch
git checkout --track origin/$GITHUB_HEAD_REF
git config --local user.email "actions@github.com"
git config --local user.name "Actions Auto Build"
git stash pop
git add src
git commit -m "Stylelint auto-fixes"
git push
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@changesets/cli": "2.18.1",
"@github/prettier-config": "0.0.4",
"@koddsson/postcss-sass": "5.0.0",
"@primer/stylelint-config": "12.1.1",
"@primer/stylelint-config": "12.2.0",
"autoprefixer": "10.4.0",
"cssstats": "4.0.2",
"eslint": "8.4.0",
Expand All @@ -64,7 +64,6 @@
"prettier": "2.5.1",
"semver": "7.3.5",
"stylelint": "14.1.0",
"stylelint-scss": "4.0.0",
"table": "6.7.5"
},
"jest": {
Expand Down
2 changes: 1 addition & 1 deletion src/actionlist/action-list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
visibility: hidden;
opacity: 0;
transition:
visibility 0 linear $actionList-item-checkmark-transition-timing,
visibility 0 linear $actionList-item-checkmark-transition-timing,
opacity $actionList-item-checkmark-transition-timing;
}

Expand Down
2 changes: 1 addition & 1 deletion src/autocomplete/autocomplete.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}

&.selected,
&[aria-selected=true],
&[aria-selected='true'],
&.navigation-focus {
color: var(--color-fg-on-emphasis);
text-decoration: none;
Expand Down
1 change: 1 addition & 0 deletions src/base/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ hr,
background: transparent;
border: 0;
border-bottom: $border-width $border-style var(--color-border-muted);

@include clearfix();
}

Expand Down
1 change: 0 additions & 1 deletion src/base/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../support/index.scss';

@import './normalize.scss';
@import './base.scss';
@import './kbd.scss';
Expand Down
1 change: 0 additions & 1 deletion src/blankslate/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@import '../support/index.scss';

@import './blankslate.scss';
2 changes: 1 addition & 1 deletion src/breadcrumb/breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}

.breadcrumb-item-selected,
.breadcrumb-item[aria-current]:not([aria-current=false]) {
.breadcrumb-item[aria-current]:not([aria-current='false']) {
&::after {
content: none;
}
Expand Down
5 changes: 3 additions & 2 deletions src/buttons/button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.BtnGroup {
display: inline-block;
vertical-align: middle;

@include clearfix();

// Proper spacing for multiple button groups (a la, gollum editor)
Expand Down Expand Up @@ -33,7 +34,7 @@
}

&.selected,
&[aria-selected=true],
&[aria-selected='true'],
&:focus,
&:active,
&:hover {
Expand Down Expand Up @@ -66,7 +67,7 @@
}

&.selected,
&[aria-selected=true],
&[aria-selected='true'],
&:focus,
&:active,
&:hover {
Expand Down
18 changes: 9 additions & 9 deletions src/buttons/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

&:disabled,
&.disabled,
&[aria-disabled=true] {
&[aria-disabled='true'] {
cursor: default;
}

Expand Down Expand Up @@ -84,14 +84,14 @@
}

&.selected,
&[aria-selected=true] {
&[aria-selected='true'] {
background-color: var(--color-btn-selected-bg);
box-shadow: var(--color-primer-shadow-inset);
}

&:disabled,
&.disabled,
&[aria-disabled=true] {
&[aria-disabled='true'] {
color: var(--color-primer-fg-disabled);
background-color: var(--color-btn-bg);
border-color: var(--color-btn-border);
Expand Down Expand Up @@ -127,14 +127,14 @@

&:active,
&.selected,
&[aria-selected=true] {
&[aria-selected='true'] {
background-color: var(--color-btn-primary-selected-bg);
box-shadow: var(--color-btn-primary-selected-shadow);
}

&:disabled,
&.disabled,
&[aria-disabled=true] {
&[aria-disabled='true'] {
color: var(--color-btn-primary-disabled-text);
background-color: var(--color-btn-primary-disabled-bg);
border-color: var(--color-btn-primary-disabled-border);
Expand Down Expand Up @@ -184,7 +184,7 @@

&:active,
&.selected,
&[aria-selected=true] {
&[aria-selected='true'] {
color: var(--color-btn-outline-selected-text);
background-color: var(--color-btn-outline-selected-bg);
border-color: var(--color-btn-outline-selected-border);
Expand All @@ -193,7 +193,7 @@

&:disabled,
&.disabled,
&[aria-disabled=true] {
&[aria-disabled='true'] {
color: var(--color-btn-outline-disabled-text);
background-color: var(--color-btn-outline-disabled-bg);
border-color: var(--color-btn-border);
Expand Down Expand Up @@ -242,7 +242,7 @@

&:active,
&.selected,
&[aria-selected=true] {
&[aria-selected='true'] {
color: var(--color-btn-danger-selected-text);
background-color: var(--color-btn-danger-selected-bg);
border-color: var(--color-btn-danger-selected-border);
Expand All @@ -251,7 +251,7 @@

&:disabled,
&.disabled,
&[aria-disabled=true] {
&[aria-disabled='true'] {
color: var(--color-btn-danger-disabled-text);
background-color: var(--color-btn-danger-disabled-bg);
border-color: var(--color-btn-border);
Expand Down
11 changes: 5 additions & 6 deletions src/buttons/misc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}

&:disabled,
&[aria-disabled=true] {
&[aria-disabled='true'] {
&,
&:hover {
color: var(--color-primer-fg-disabled);
Expand Down Expand Up @@ -50,7 +50,7 @@
&:active,
&:focus,
&.selected,
&[aria-selected=true],
&[aria-selected='true'],
&.zeroclipboard-is-active {
color: var(--color-accent-fg);
background-color: none;
Expand All @@ -59,14 +59,13 @@
box-shadow: var(--color-btn-focus-shadow);
}

&:active
&.zeroclipboard-is-active {
&:active &.zeroclipboard-is-active {
background-color: var(--color-btn-selected-bg);
}

&:disabled,
&.disabled,
&[aria-disabled=true] {
&[aria-disabled='true'] {
color: var(--color-primer-fg-disabled);
background-color: transparent;
}
Expand All @@ -93,7 +92,7 @@
&:hover { color: var(--color-accent-fg); }

&.disabled,
&[aria-disabled=true] {
&[aria-disabled='true'] {
color: var(--color-primer-fg-disabled);
cursor: default;

Expand Down
1 change: 1 addition & 0 deletions src/color-modes/native.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Enables color modes for native elements

@include color-mode(light) { color-scheme: light; }

@include color-mode(dark) { color-scheme: dark; }

[data-color-mode] {
Expand Down
1 change: 0 additions & 1 deletion src/color-modes/themes/dark.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../../support/index.scss';

@import '@primer/primitives/dist/scss/colors/_dark.scss';

@include color-mode-theme(dark) {
Expand Down
1 change: 0 additions & 1 deletion src/color-modes/themes/dark_colorblind.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../../support/index.scss';

@import '@primer/primitives/dist/scss/colors/_dark_colorblind.scss';

@include color-mode-theme(dark_colorblind) {
Expand Down
1 change: 0 additions & 1 deletion src/color-modes/themes/dark_dimmed.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../../support/index.scss';

@import '@primer/primitives/dist/scss/colors/_dark_dimmed.scss';

@include color-mode-theme(dark_dimmed) {
Expand Down
1 change: 0 additions & 1 deletion src/color-modes/themes/dark_high_contrast.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../../support/index.scss';

@import '@primer/primitives/dist/scss/colors/_dark_high_contrast.scss';

@include color-mode-theme(dark_high_contrast) {
Expand Down
1 change: 0 additions & 1 deletion src/color-modes/themes/light.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../../support/index.scss';

@import '@primer/primitives/dist/scss/colors/_light.scss';

@include color-mode-theme(light, true) {
Expand Down
1 change: 0 additions & 1 deletion src/color-modes/themes/light_colorblind.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../../support/index.scss';

@import '@primer/primitives/dist/scss/colors/_light_colorblind.scss';

@include color-mode-theme(light_colorblind) {
Expand Down
1 change: 0 additions & 1 deletion src/color-modes/themes/light_high_contrast.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../../support/index.scss';

@import '@primer/primitives/dist/scss/colors/_light_high_contrast.scss';

@include color-mode-theme(light_high_contrast) {
Expand Down
2 changes: 2 additions & 0 deletions src/forms/form-control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ label {
// Ensures inputs don't zoom on mobile iPhone but are body-font size on iPad
@supports (-webkit-touch-callout: none) {
font-size: $h4-size;

@include breakpoint(md) {
font-size: $body-font-size;
}
Expand Down Expand Up @@ -181,6 +182,7 @@ textarea.form-control {
.hfields {
// stylelint-disable-next-line primer/spacing
margin: 15px 0;

@include clearfix;

.form-group {
Expand Down
1 change: 0 additions & 1 deletion src/labels/index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import '../support/index.scss';
@import './mixins.scss';

@import './issue-labels.scss';
@import './labels.scss';
@import './states.scss';
Expand Down
1 change: 1 addition & 0 deletions src/labels/labels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.label, // TODO: Deprecte
.Label {
@include labels-base;

border-color: var(--color-border-default);

&:hover {
Expand Down
1 change: 0 additions & 1 deletion src/layout/index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import '../support/index.scss';
@import './mixins.scss';

@import './container.scss';
@import './grid.scss';
@import './grid-offset.scss';
Expand Down
6 changes: 1 addition & 5 deletions src/layout/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

.Layout {
display: grid;

--Layout-sidebar-width: #{map-get($sidebar-width, 'sm')};
--Layout-gutter: 16px;

Expand All @@ -25,7 +26,6 @@

grid-auto-flow: column;
grid-template-columns: auto 0 1fr; // sidebar column, separator, main column
// stylelint-disable-next-line primer/no-undefined-vars
grid-gap: var(--Layout-gutter);

.Layout-sidebar {
Expand Down Expand Up @@ -146,7 +146,6 @@
}

.Layout-sidebar {
// stylelint-disable-next-line primer/no-undefined-vars
width: var(--Layout-sidebar-width);
}

Expand All @@ -169,17 +168,14 @@
}

.Layout-main-centered-md {
// stylelint-disable-next-line primer/no-undefined-vars
max-width: calc(#{$container-md} + var(--Layout-sidebar-width) + var(--Layout-gutter));
}

.Layout-main-centered-lg {
// stylelint-disable-next-line primer/no-undefined-vars
max-width: calc(#{$container-lg} + var(--Layout-sidebar-width) + var(--Layout-gutter));
}

.Layout-main-centered-xl {
// stylelint-disable-next-line primer/no-undefined-vars
max-width: calc(#{$container-xl} + var(--Layout-sidebar-width) + var(--Layout-gutter));
}
}
6 changes: 3 additions & 3 deletions src/layout/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
.Layout-sidebar,
.Layout-divider,
.Layout-main {
width: 100% !important;
grid-column: 1 !important;
}
width: 100% !important;
grid-column: 1 !important;
}

&.Layout--sidebarPosition-flowRow-start {
.Layout-sidebar {
Expand Down
4 changes: 2 additions & 2 deletions src/markdown/images.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
box-sizing: content-box;
background-color: var(--color-canvas-default);

&[align=right] {
&[align='right'] {
// stylelint-disable-next-line primer/spacing
padding-left: 20px;
}

&[align=left] {
&[align='left'] {
// stylelint-disable-next-line primer/spacing
padding-right: 20px;
}
Expand Down
Loading

0 comments on commit e8d5402

Please sign in to comment.