Re-organize SASS structure (#1425)

This commit is contained in:
Ismail El Korchi 2020-05-10 01:40:21 +00:00 committed by GitHub
parent 27fc314b55
commit 5c74dc9fa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 541 additions and 515 deletions

20
sass/base/_base.scss Normal file
View file

@ -0,0 +1,20 @@
/* Typography
--------------------------------------------- */
@import "typography/typography";
/* Elements
--------------------------------------------- */
@import "elements/body";
@import "elements/hr";
@import "elements/lists";
@import "elements/media";
@import "elements/tables";
/* Links
--------------------------------------------- */
@import "elements/links";
/* Forms
--------------------------------------------- */
@import "elements/buttons";
@import "elements/fields";

View file

@ -0,0 +1,3 @@
body {
background: $color__background-body; // Fallback for when there is no custom background color defined.
}

View file

@ -0,0 +1,22 @@
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
border: 1px solid;
border-color: $color__border-button;
border-radius: 3px;
background: $color__background-button;
color: rgba(0, 0, 0, 0.8);
font-size: 0.75rem;
line-height: 1;
padding: 0.6em 1em 0.4em;
&:hover {
border-color: $color__border-button-hover;
}
&:active,
&:focus {
border-color: $color__border-button-focus;
}
}

View file

@ -0,0 +1,33 @@
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea {
color: $color__text-input;
border: 1px solid $color__border-input;
border-radius: 3px;
padding: 3px;
&:focus {
color: $color__text-input-focus;
}
}
select {
border: 1px solid $color__border-input;
}
textarea {
width: 100%;
}

View file

@ -0,0 +1,6 @@
hr {
background-color: $color__background-hr;
border: 0;
height: 1px;
margin-bottom: 1.5em;
}

View file

@ -0,0 +1,22 @@
a {
color: $color__link;
&:visited {
color: $color__link-visited;
}
&:hover,
&:focus,
&:active {
color: $color__link-hover;
}
&:focus {
outline: thin dotted;
}
&:hover,
&:active {
outline: 0;
}
}

View file

@ -0,0 +1,26 @@
ul,
ol {
margin: 0 0 1.5em 3em;
}
ul {
list-style: disc;
}
ol {
list-style: decimal;
}
li > ul,
li > ol {
margin-bottom: 0;
margin-left: 1.5em;
}
dt {
font-weight: 700;
}
dd {
margin: 0 1.5em 1.5em;
}

View file

@ -0,0 +1,15 @@
/* Make sure embeds and iframes fit their containers. */
embed,
iframe,
object {
max-width: 100%;
}
img {
height: auto; // Make sure images are scaled correctly.
max-width: 100%; // Adhere to container width.
}
figure {
margin: 1em 0; // Extra wide images within figure tags don't overflow the content area.
}

View file

@ -0,0 +1,4 @@
table {
margin: 0 0 1.5em;
width: 100%;
}

View file

@ -0,0 +1,53 @@
p {
margin-bottom: 1.5em;
}
dfn,
cite,
em,
i {
font-style: italic;
}
blockquote {
margin: 0 1.5em;
}
address {
margin: 0 0 1.5em;
}
pre {
background: $color__background-pre;
font-family: $font__pre;
font-size: 0.9375rem;
line-height: $font__line-height-pre;
margin-bottom: 1.6em;
max-width: 100%;
overflow: auto;
padding: 1.6em;
}
code,
kbd,
tt,
var {
font-family: $font__code;
font-size: 0.9375rem;
}
abbr,
acronym {
border-bottom: 1px dotted $color__border-abbr;
cursor: help;
}
mark,
ins {
background: $color__background-ins;
text-decoration: none;
}
big {
font-size: 125%;
}

View file

@ -0,0 +1,8 @@
h1,
h2,
h3,
h4,
h5,
h6 {
clear: both;
}

View file

@ -0,0 +1,14 @@
body,
button,
input,
select,
optgroup,
textarea {
color: $color__text-main;
font-family: $font__main;
font-size: 1rem;
line-height: $font__line-height-body;
}
@import "headings";
@import "copy";