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

Refactor default theme for better maintainability, bring CSS variables and stylelint #74

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Update specificity, remove duplicate selector
ronilaukkarinen committed Oct 26, 2021
commit a08a5592bbc9bfa954fdb633c7036cd50a5ad99e
6 changes: 3 additions & 3 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@
"comment-whitespace-inside": "always",
"indentation": 2,
"linebreaks": "unix",
"selector-max-specificity": "0,4,4",
"selector-max-specificity": "0,6,6",
"block-no-empty": true,
"declaration-colon-newline-after": null,
"declaration-empty-line-before": null,
@@ -153,8 +153,8 @@
"number-max-precision": 3,
"selector-class-pattern": null,
"selector-max-class": 4,
"selector-max-combinators": 3,
"selector-max-compound-selectors": 4,
"selector-max-combinators": 6,
"selector-max-compound-selectors": 6,
"selector-max-pseudo-class": 2,
"selector-max-universal": 1,
"property-no-vendor-prefix": true,
6 changes: 2 additions & 4 deletions src/scss/_theme-default.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// stylelint-disable no-descending-specificity
// CSS Variables for off canvas menu
.hc-offcanvas-nav {

// CSS Variables for off canvas menu
// Colors
--hc-offcanvas-nav-color-background: #336ca6;
--hc-offcanvas-nav-color-background-hilight: #2e6296;
@@ -24,9 +25,6 @@
--hc-offcanvas-nav-font-size-heading: 19px;
--hc-offcanvas-heading-padding-y: 20px;
--hc-offcanvas-heading-padding-x: 17px;
}

.hc-offcanvas-nav {
font-family: var(--hc-offcanvas-nav-font-family);
}