Skip to content

Commit

Permalink
feat(scss): adds new .has-focus class to MyComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
richmccartney committed Nov 17, 2020
1 parent e9b5efc commit 660b64b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
7 changes: 0 additions & 7 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,5 @@
"publishConfig": {
"access": "public",
"directory": "dist"
},
"command": {
"publish": {
"allowBranch": "main",
"conventionalCommits": true,
"message": "chore(release): updated release notes and package versions"
}
}
}
8 changes: 7 additions & 1 deletion packages/components/src/scss/MyComponent.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@
}

.MyComponent {
$c: &;

color: var(--MyComponent-color);
display: flex;

&.is-animating {
display: block;
}

&--modifier {
&.has-focus {
display: block;
}

.MyComponent--modifier {
display: inline-block;
}

Expand Down
3 changes: 2 additions & 1 deletion packages/components/stylelint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ module.exports = {
rules: {
"at-rule-no-unknown": true,
"scss/at-rule-no-unknown": true,
"no-eol-whitespace": null,
"plugin/selector-bem-pattern": {
preset: "suit",
componentName: "[A-Z]+",
componentSelectors: {
initial:
"^\\.{componentName}(?:-[a-zA-Z0-9]+)?(?:--[a-zA-Z0-9]+)?(?:.is-[a-zA-Z0-9]+)?$",
"^\\.{componentName}(?:-[a-zA-Z0-9]+)?(?:--[a-zA-Z0-9]+)?(?:.is-[a-zA-Z0-9]+)?(?:.has-[a-zA-Z0-9]+)?$",
},
utilitySelectors: "^\\.u-[a-zA-Z0-9]+$",
},
Expand Down

0 comments on commit 660b64b

Please # to comment.