-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(reset): add initial implementation of the CSS reset
- Loading branch information
1 parent
14e7ce1
commit 4e0088c
Showing
3 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$mk-reset-margin: 1rem !default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
// stylelint-disable scss/at-import-no-partial-leading-underscore | ||
// stylelint-disable selector-max-type | ||
@import "@material/layout-grid/mixins"; | ||
@import "@material/layout-grid/variables"; | ||
@import "@material/theme/mixins"; | ||
@import "@material/typography/mixins"; | ||
@import "@material/typography/variables"; | ||
@import "reset-css/_reset"; | ||
@import "./variables"; | ||
|
||
html { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
// Generic block-level elements | ||
body { | ||
width: 100%; | ||
min-height: 100%; | ||
margin: 0; | ||
} | ||
|
||
p { | ||
margin-top: 0; | ||
margin-bottom: $mk-reset-margin; | ||
} | ||
|
||
blockquote { | ||
margin: 0 0 $mk-reset-margin; | ||
} | ||
|
||
figure { | ||
margin: 0 0 $mk-reset-margin; | ||
} | ||
|
||
hr { | ||
height: 1px; | ||
margin: $mk-reset-margin 0; | ||
border: 0; | ||
background-color: rgba(0, 0, 0, .12); | ||
|
||
@include mdc-theme-dark { | ||
background-color: rgba(255, 255, 255, .12); | ||
} | ||
} | ||
|
||
// Heading elements | ||
h1 { | ||
@include mdc-typography(display1); | ||
|
||
margin-top: 0; | ||
margin-bottom: $mk-reset-margin; | ||
} | ||
|
||
h2 { | ||
@include mdc-typography(headline); | ||
margin-top: 0; | ||
margin-bottom: $mk-reset-margin; | ||
} | ||
|
||
h3 { | ||
@include mdc-typography(title); | ||
|
||
margin-top: 0; | ||
margin-bottom: $mk-reset-margin; | ||
} | ||
|
||
h4 { | ||
@include mdc-typography(subheading2); | ||
|
||
margin-top: 0; | ||
margin-bottom: $mk-reset-margin; | ||
} | ||
|
||
h5 { | ||
@include mdc-typography(subheading1); | ||
|
||
margin-top: 0; | ||
margin-bottom: $mk-reset-margin; | ||
} | ||
|
||
h6 { | ||
@include mdc-typography(body2); | ||
|
||
margin-top: 0; | ||
margin-bottom: $mk-reset-margin; | ||
} | ||
|
||
// Tables | ||
table { | ||
border-collapse: collapse; | ||
} | ||
|
||
th { | ||
// stylelint-disable font-weight-notation | ||
font-weight: map-get($mdc-typography-font-weight-values, bold); | ||
text-align: inherit; | ||
} | ||
|
||
caption { | ||
text-align: inherit; | ||
} | ||
|
||
// Lists | ||
ul, | ||
ol, | ||
dl { | ||
margin-top: 0; | ||
margin-bottom: $mk-reset-margin; | ||
} | ||
|
||
// Inline elements | ||
ins { | ||
text-decoration: none; | ||
} | ||
|
||
strong, | ||
b { | ||
font-weight: map-get($mdc-typography-font-weight-values, bold); | ||
} | ||
|
||
em { | ||
font-style: italic; | ||
} | ||
|
||
pre { | ||
margin-top: 0; | ||
margin-bottom: $mk-reset-margin; | ||
} | ||
|
||
small { | ||
font-size: smaller; | ||
} | ||
|
||
// States | ||
a { | ||
outline: none; | ||
text-decoration: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters