site/web/_sass/_base.scss

225 lines
2.6 KiB
SCSS
Raw Normal View History

2014-10-20 20:33:40 +00:00
/**
* Reset some basic elements
*/
2017-06-12 23:21:31 +00:00
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
dl,
dd,
ol,
ul,
figure {
2014-10-20 20:33:40 +00:00
margin: 0;
padding: 0;
}
/**
* Basic styling
*/
2017-06-12 23:21:31 +00:00
2014-10-20 20:33:40 +00:00
body {
font-family: $base-font-family;
font-size: $base-font-size;
line-height: $base-line-height;
font-weight: 300;
color: $text-color;
background-color: $background-color;
-webkit-text-size-adjust: 100%;
}
/**
* Set `margin-bottom` to maintain vertical rhythm
*/
2017-06-12 23:21:31 +00:00
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
ul,
ol,
dl,
figure,
2014-10-20 20:33:40 +00:00
%vertical-rhythm {
margin-bottom: $spacing-unit / 2;
}
/**
* Images
*/
2017-06-12 23:21:31 +00:00
2014-10-20 20:33:40 +00:00
img {
max-width: 100%;
vertical-align: middle;
}
/**
* Figures
*/
2017-06-12 23:21:31 +00:00
figure>img {
2014-10-20 20:33:40 +00:00
display: block;
}
figcaption {
font-size: $small-font-size;
}
/**
* Lists
*/
2017-06-12 23:21:31 +00:00
ul,
ol {
2014-10-20 20:33:40 +00:00
margin-left: $spacing-unit;
}
li {
2017-06-12 23:21:31 +00:00
>ul,
>ol {
margin-bottom: 0;
2014-10-20 20:33:40 +00:00
}
}
/**
* Headings
*/
2017-06-12 23:21:31 +00:00
h1,
h2,
h3,
h4,
h5,
h6 {
2014-10-20 20:33:40 +00:00
font-weight: 300;
}
/**
* Links
*/
2017-06-12 23:21:31 +00:00
2014-10-20 20:33:40 +00:00
a {
color: $brand-color;
text-decoration: none;
&:visited {
color: darken($brand-color, 15%);
}
&:hover {
color: $text-color;
text-decoration: underline;
}
}
/**
* Blockquotes
*/
2017-06-12 23:21:31 +00:00
2014-10-20 20:33:40 +00:00
blockquote {
color: $grey-color;
border-left: 4px solid $grey-color-light;
padding-left: $spacing-unit / 2;
font-size: 18px;
letter-spacing: -1px;
font-style: italic;
> :last-child {
margin-bottom: 0;
}
}
/**
* Code formatting
*/
2017-06-12 23:21:31 +00:00
2014-10-20 20:33:40 +00:00
pre,
code {
font-size: 15px;
border: 1px solid $grey-color-light;
border-radius: 3px;
background-color: #eef;
}
code {
padding: 1px 5px;
}
pre {
padding: 8px 12px;
overflow-x: scroll;
2017-06-12 23:21:31 +00:00
>code {
2014-10-20 20:33:40 +00:00
border: 0;
padding-right: 0;
padding-left: 0;
}
}
/**
* Wrapper
*/
2017-06-12 23:21:31 +00:00
2014-10-20 20:33:40 +00:00
.wrapper {
max-width: -webkit-calc(800px - (#{$spacing-unit} * 2));
2017-06-12 23:21:31 +00:00
max-width : calc(800px - (#{$spacing-unit} * 2));
2014-10-20 20:33:40 +00:00
margin-right: auto;
margin-left: auto;
padding-right: $spacing-unit;
padding-left: $spacing-unit;
@extend %clearfix;
@include media-query($on-laptop) {
max-width: -webkit-calc(800px - (#{$spacing-unit}));
2017-06-12 23:21:31 +00:00
max-width : calc(800px - (#{$spacing-unit}));
2014-10-20 20:33:40 +00:00
padding-right: $spacing-unit / 2;
padding-left: $spacing-unit / 2;
}
}
/**
* Clearfix
*/
2017-06-12 23:21:31 +00:00
%clearfix {
2014-10-20 20:33:40 +00:00
&:after {
content: "";
display: table;
clear: both;
}
}
/**
* Icons
*/
2017-06-12 23:21:31 +00:00
.icon {
>svg {
2014-10-20 20:33:40 +00:00
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
path {
fill: $grey-color;
}
}
2017-06-12 23:21:31 +00:00
}