Skip to content

Commit

Permalink
feat(reset): add initial implementation of the CSS reset
Browse files Browse the repository at this point in the history
  • Loading branch information
rustemgareev committed Dec 18, 2017
1 parent 14e7ce1 commit 4e0088c
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/reset/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$mk-reset-margin: 1rem !default;
139 changes: 139 additions & 0 deletions components/reset/reset.scss
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;
}
1 change: 1 addition & 0 deletions material-kit.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import "./components/reset/reset";
@import "./components/button/button";
@import "./components/card/card";
@import "./components/checkbox/checkbox";
Expand Down

0 comments on commit 4e0088c

Please sign in to comment.