Skip to content

Commit

Permalink
style(scss): Rearrange the stylint extends so that CSS modules comes …
Browse files Browse the repository at this point in the history
…second.

This ensures that is works correctly to ignore the composes without writing our own rules.
  • Loading branch information
ryanoglesby08 committed Sep 20, 2017
1 parent ec3345e commit bc081eb
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 22 deletions.
23 changes: 2 additions & 21 deletions config/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": [
"stylelint-config-css-modules",
"stylelint-config-standard"
"stylelint-config-standard",
"stylelint-config-css-modules"
],
"plugins": [
"stylelint-scss"
Expand All @@ -15,25 +15,6 @@
"include"
]
}
],
"declaration-block-no-duplicate-properties": [
true,
{
"ignoreProperties": [
"composes"
]
}
],
"property-no-unknown": [
true,
{
"ignoreProperties": [
"composes"
]
}
],
"declaration-empty-line-before": [
"never"
]
}
}
6 changes: 6 additions & 0 deletions src/components/Button/Button.modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ $button-text-color: $color-white;

&:hover {
@include border;

color: $button-text-color;
}
}
Expand All @@ -56,6 +57,7 @@ $button-text-color: $color-white;

&:hover {
@include border;

background-color: $button-text-color;
color: $primary-bg-color;
}
Expand All @@ -68,6 +70,7 @@ $button-text-color: $color-white;

&:hover {
@include border;

background-color: $button-text-color;
color: $secondary-bg-color;
}
Expand All @@ -87,6 +90,7 @@ $button-text-color: $color-white;
composes: button;

@include border;

background-color: transparent;
color: $button-text-color;

Expand All @@ -103,6 +107,7 @@ $button-text-color: $color-white;

&:hover {
@include border;

background-color: transparent;
}
}
Expand All @@ -114,6 +119,7 @@ $button-text-color: $color-white;

&:hover {
@include border;

background-color: transparent;
color: $button-text-color;
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Input/Input.modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ input.input {
line-height: 1.5;

@include helvetica-neue-light-45;

color: $color-shark;
background-color: transparent;

Expand Down
3 changes: 2 additions & 1 deletion src/components/Link/ChevronLink/ChevronLink.modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
@import '../../../scss/settings/typography';

.link {
@include helvetica-neue-roman-55;
composes: medium from '../../Typography/Text/Text.modules.scss';

@include helvetica-neue-roman-55;

&:hover {
.rightChevron {
transform: translateX(0.25rem);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
composes: noSpacing from '../../Spacing/Spacing.modules.scss';

@include helvetica-neue-thin-35;

font-size: 2.75rem;
line-height: 1.14; // 48px

Expand Down
1 change: 1 addition & 0 deletions src/components/Typography/Heading/Heading.modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
composes: noSpacing from '../../Spacing/Spacing.modules.scss';

@include helvetica-neue-medium-65;

letter-spacing: -0.6px;
}

Expand Down

0 comments on commit bc081eb

Please sign in to comment.