hacks-guide-minimal-mistake.../_sass/typography.scss

147 lines
2.5 KiB
SCSS
Raw Normal View History

2013-09-07 14:44:10 +02:00
// Headings
// --------------------------------------------------
2013-05-24 16:25:31 +02:00
h1, h2, h3, h4, h5, h6 {
2014-07-31 19:09:32 +02:00
font-family: $heading-font;
2013-05-24 16:25:31 +02:00
}
2013-09-07 14:44:10 +02:00
h1 {
2014-07-31 19:09:32 +02:00
@include font-size(32);
2013-09-07 17:59:02 +02:00
}
h2 {
2014-07-31 19:09:32 +02:00
@include font-size(28);
2013-09-07 17:59:02 +02:00
}
h3 {
2014-07-31 19:09:32 +02:00
@include font-size(24);
2013-09-07 17:59:02 +02:00
}
h4 {
2014-07-31 19:09:32 +02:00
@include font-size(18);
2013-09-07 17:59:02 +02:00
}
h5 {
2014-07-31 19:09:32 +02:00
@include font-size(16);
2013-09-07 17:59:02 +02:00
}
h6 {
2014-07-31 19:09:32 +02:00
@include font-size(14);
2013-05-24 16:25:31 +02:00
}
2013-09-07 14:44:10 +02:00
// Links
// --------------------------------------------------
2013-05-24 16:25:31 +02:00
a {
text-decoration: none;
2014-07-31 19:09:32 +02:00
color: $link-color;
2013-05-24 16:25:31 +02:00
&:visited {
2014-07-31 19:09:32 +02:00
color: $linkcolorvisited;
2013-05-24 16:25:31 +02:00
}
&:hover {
2014-07-31 19:09:32 +02:00
color: $linkcolorhover;
2013-05-24 16:25:31 +02:00
}
&:focus {
outline: thin dotted;
2014-07-31 19:09:32 +02:00
color: $linkcolorfocus;
2013-05-24 16:25:31 +02:00
}
&:hover,
&:active {
outline: 0;
}
}
2013-09-07 14:44:10 +02:00
// Figures
// --------------------------------------------------
figcaption {
padding-top: 10px;
2014-07-31 19:09:32 +02:00
@include font(14);
2013-09-07 14:44:10 +02:00
line-height: 1.3;
2014-07-31 19:09:32 +02:00
color: lighten($text-color, 10);
2013-05-24 16:25:31 +02:00
}
2013-09-07 14:44:10 +02:00
// Feature Image Caption
// --------------------------------------------------
.image-credit {
2014-07-31 19:09:32 +02:00
@include grid(12,10);
@include prefix(12,1);
@include suffix(12,1);
display: block;
2013-09-07 14:44:10 +02:00
text-align: right;
2014-07-31 19:09:32 +02:00
@include font(12);
2013-09-07 14:44:10 +02:00
line-height: 1.3;
font-style: italic;
2014-07-31 19:09:32 +02:00
color: lighten($text-color, 30);
@media #{$small} {
@include grid(12,9);
@include prefix(12,0);
@include suffix(12,0);
}
2014-07-31 19:09:32 +02:00
@media #{$x-large} {
@include grid(12,8.5);
}
2013-09-07 14:44:10 +02:00
a {
2014-07-31 19:09:32 +02:00
color: lighten($text-color, 30);
2013-05-24 16:25:31 +02:00
}
}
2013-09-07 14:44:10 +02:00
// Note text
// --------------------------------------------------
2013-05-24 16:25:31 +02:00
.notice {
margin-top: 1.5em;
padding: .5em 1em;
text-indent: 0;
2014-07-31 19:09:32 +02:00
@include font-rem(14);
background-color: $body-color;
border: 1px solid darken($body-color,20);
@include rounded(3px);
2013-05-24 16:25:31 +02:00
}
2013-09-07 14:44:10 +02:00
// Blockquotes
// --------------------------------------------------
2013-05-24 16:25:31 +02:00
blockquote {
2013-09-07 14:44:10 +02:00
margin-left: -28px;
padding-left: 20px;
2014-07-31 19:09:32 +02:00
border-left: 8px solid $border-color;
font-family: $alt-font;
2013-05-24 16:25:31 +02:00
font-style: italic;
}
2013-09-07 14:44:10 +02:00
// Footnotes
// --------------------------------------------------
2013-09-07 18:57:20 +02:00
.footnotes {
2013-09-07 14:44:10 +02:00
ol, li, p {
2013-12-09 15:32:40 +01:00
margin-bottom: 0;
2014-07-31 19:09:32 +02:00
@include font-rem(14);
2013-09-07 14:44:10 +02:00
}
2013-06-30 21:41:53 +02:00
}
2013-09-07 14:44:10 +02:00
2013-09-07 16:10:55 +02:00
// Paragraphs
// --------------------------------------------------
p {
2014-07-31 19:09:32 +02:00
margin: 0 0 $indent-var;
// sibling indentation
@if $paragraph-indent == true {
& + p {
text-indent: $indent-var;
margin-top: -($indent-var);
}
2013-09-07 16:10:55 +02:00
}
}
2013-09-07 14:44:10 +02:00
// Code
// --------------------------------------------------
2013-06-30 21:41:53 +02:00
tt, code, kbd, samp, pre {
2014-07-31 19:09:32 +02:00
font-family: $code-font;
2013-09-07 14:44:10 +02:00
}
p,
li {
code {
2014-07-31 19:09:32 +02:00
@include font-rem(12);
2013-09-07 14:44:10 +02:00
line-height: 1.5;
white-space: nowrap;
margin: 0 2px;
padding: 0 5px;
2014-07-31 19:09:32 +02:00
border: 1px solid lighten($black, 90);
2013-09-09 17:56:09 +02:00
background-color: #efefef;
2014-07-31 19:09:32 +02:00
@include rounded(3px);
2013-09-07 14:44:10 +02:00
}
}
pre {
2014-07-31 19:09:32 +02:00
@include font-rem(12);
2013-09-07 14:44:10 +02:00
line-height: 1.5;
overflow-x: auto;
2013-06-30 21:41:53 +02:00
}