Re-organize SASS structure (#1425)
This commit is contained in:
parent
27fc314b55
commit
5c74dc9fa8
52 changed files with 541 additions and 515 deletions
20
sass/base/_base.scss
Normal file
20
sass/base/_base.scss
Normal 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";
|
3
sass/base/elements/_body.scss
Normal file
3
sass/base/elements/_body.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
background: $color__background-body; // Fallback for when there is no custom background color defined.
|
||||
}
|
22
sass/base/elements/_buttons.scss
Normal file
22
sass/base/elements/_buttons.scss
Normal 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;
|
||||
}
|
||||
}
|
33
sass/base/elements/_fields.scss
Normal file
33
sass/base/elements/_fields.scss
Normal 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%;
|
||||
}
|
6
sass/base/elements/_hr.scss
Normal file
6
sass/base/elements/_hr.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
hr {
|
||||
background-color: $color__background-hr;
|
||||
border: 0;
|
||||
height: 1px;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
22
sass/base/elements/_links.scss
Normal file
22
sass/base/elements/_links.scss
Normal 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;
|
||||
}
|
||||
}
|
26
sass/base/elements/_lists.scss
Normal file
26
sass/base/elements/_lists.scss
Normal 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;
|
||||
}
|
15
sass/base/elements/_media.scss
Normal file
15
sass/base/elements/_media.scss
Normal 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.
|
||||
}
|
4
sass/base/elements/_tables.scss
Normal file
4
sass/base/elements/_tables.scss
Normal file
|
@ -0,0 +1,4 @@
|
|||
table {
|
||||
margin: 0 0 1.5em;
|
||||
width: 100%;
|
||||
}
|
53
sass/base/typography/_copy.scss
Normal file
53
sass/base/typography/_copy.scss
Normal 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%;
|
||||
}
|
8
sass/base/typography/_headings.scss
Normal file
8
sass/base/typography/_headings.scss
Normal file
|
@ -0,0 +1,8 @@
|
|||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
clear: both;
|
||||
}
|
14
sass/base/typography/_typography.scss
Normal file
14
sass/base/typography/_typography.scss
Normal 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";
|
Loading…
Add table
Add a link
Reference in a new issue