graffen.dk-website/_sass/_base.scss

194 lines
2.3 KiB
SCSS
Raw Normal View History

2015-02-11 12:14:22 +00:00
/**
* Reset some basic elements
*/
body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, hr,
dl, dd, ol, ul, figure {
margin: 0;
padding: 0;
}
/**
* Basic styling
*/
body {
font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
2015-02-11 12:14:22 +00:00
color: $text-color;
background-color: $background-color;
}
/**
* Set `margin-bottom` to maintain vertical rhythm
*/
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
ul, ol, dl, figure, table,
2015-02-11 12:14:22 +00:00
%vertical-rhythm {
margin-bottom: $spacing-unit / 2;
}
/**
* Images
*/
img {
max-width: 100%;
vertical-align: middle;
}
/**
* Figures
*/
figure > img {
display: block;
}
figcaption {
font-size: $small-font-size;
}
/**
* Lists
*/
ul, ol {
margin-left: $spacing-unit;
}
li {
> ul,
> ol {
margin-bottom: 0;
}
}
/**
* Headings
*/
h1, h2, h3, h4, h5, h6 {
font-weight: $base-font-weight;
2015-02-11 12:14:22 +00:00
}
/**
* Links
*/
a {
color: $brand-color;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
/**
* Blockquotes
*/
blockquote {
color: $grey-color;
padding-left: $spacing-unit / 2;
border-left: 2px solid $grey-color-light;
2015-02-11 12:14:22 +00:00
font-style: italic;
font-size: $small-font-size;
2015-02-11 12:14:22 +00:00
> :last-child {
margin-bottom: 0;
}
}
/**
* Code formatting
*/
pre,
code {
background-color: #fcfcfc;
2015-02-11 12:14:22 +00:00
}
code {
padding: 1px 5px;
font-family: $code-font-family;
2015-02-11 12:14:22 +00:00
}
pre {
padding: 8px 12px;
overflow-x: auto;
border-left: 2px solid $grey-color-light;
2015-02-11 12:14:22 +00:00
> code {
border: 0;
padding-right: 0;
padding-left: 0;
tab-size: 4;
2015-02-11 12:14:22 +00:00
}
}
/**
* Table
2015-02-11 12:14:22 +00:00
*/
table {
width: 100%;
max-width: 100%;
border-collapse: separate;
border-spacing: 0;
table-layout: fixed;
2015-02-11 12:14:22 +00:00
}
th,
td {
padding: 0.5rem;
line-height: inherit;
}
th {
text-align: left;
vertical-align: bottom;
border-bottom: 2px solid $grey-color-light;
}
td {
vertical-align: top;
border-bottom: 1px solid $grey-color-light;
}
2015-02-11 12:14:22 +00:00
/**
* Horizontal rule
2015-02-11 12:14:22 +00:00
*/
hr {
width: 30%;
border: none;
border-top: 1px solid lighten($brand-color, 30%);;
margin: $spacing-unit auto;
2015-02-11 12:14:22 +00:00
}
/**
* Clearfix
2015-02-11 12:14:22 +00:00
*/
%clearfix {
&:after {
content: "";
display: table;
clear: both;
2015-02-11 12:14:22 +00:00
}
}