1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-09-24 10:08:50 +02:00
blog/_src/_assets/styl/typography.styl

249 lines
4.7 KiB
Stylus
Raw Normal View History

2014-07-12 02:00:18 +02:00
//
// kremalicious3
// --------------
// Typography
//
// Base
/////////////////////////////////////
body
font-family: $font-family-base
font-weight: $font-weight-base
font-size: $font-size-base
line-height: $line-height-base
color: $font-color-base
2014-07-12 21:22:47 +02:00
word-wrap: break-word
2015-08-02 21:15:22 +02:00
text-rendering: optimizeLegibility;
// Controversial! But prevents text flickering in
// Safari/Firefox when animations are running
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-moz-font-feature-settings: 'liga', 'kern';
2014-07-12 02:00:18 +02:00
2014-07-12 21:22:47 +02:00
@media $breakpoint3
font-size: $font-size-large
line-height: $line-height-large
2014-07-12 02:00:18 +02:00
p,
ul,
ol
2014-07-12 21:22:47 +02:00
margin: 0 0 $line-height-computed
2014-07-12 02:00:18 +02:00
// Headings
/////////////////////////////////////
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6
2014-07-12 21:22:47 +02:00
font-family: $headings-font-family
font-weight: $headings-font-weight
line-height: $headings-line-height
color: $headings-color
2014-07-12 02:00:18 +02:00
h1, .h1,
h2, .h2
2014-07-12 21:22:47 +02:00
margin-top: ($line-height-computed*2)
margin-bottom: ($line-height-computed*2)
2014-07-12 02:00:18 +02:00
h3, .h3
h4, .h4,
h5, .h5,
h6, .h6
margin-top: $line-height-computed
margin-bottom: $line-height-computed
2014-07-12 21:22:47 +02:00
2014-07-12 02:00:18 +02:00
h1, .h1
2015-06-10 22:53:29 +02:00
font-size: $font-size-h1-small
@media $breakpoint1
font-size: $font-size-h1
@media $breakpoint3
font-size: $font-size-h1-large
2014-07-12 02:00:18 +02:00
h2, .h2
2015-06-10 22:53:29 +02:00
font-size: $font-size-h2-small
@media $breakpoint1
font-size: $font-size-h2
@media $breakpoint3
font-size: $font-size-h2-large
2014-07-12 02:00:18 +02:00
h3, .h3
2015-06-10 22:53:29 +02:00
font-size: $font-size-h3-small
@media $breakpoint1
font-size: $font-size-h3
@media $breakpoint3
font-size: $font-size-h3-large
2014-07-12 02:00:18 +02:00
h4, .h4
2015-06-10 22:53:29 +02:00
font-size: $font-size-h4-small
@media $breakpoint1
font-size: $font-size-h4
@media $breakpoint3
font-size: $font-size-h4-large
2014-07-12 02:00:18 +02:00
h5, .h5
font-size: $font-size-h5
@media $breakpoint3
font-size: $font-size-h5-large
2014-07-12 02:00:18 +02:00
h6, .h6
font-size: $font-size-h6
@media $breakpoint3
font-size: $font-size-h6-large
2014-07-12 02:00:18 +02:00
// Links
/////////////////////////////////////
a
color: $link-color
2014-07-12 21:22:47 +02:00
text-decoration: none
2014-07-12 02:00:18 +02:00
transition: color .2s ease-in-out
2014-07-12 21:22:47 +02:00
&:hover,
&:focus
2015-05-31 22:23:58 +02:00
outline: 0
2014-07-12 02:00:18 +02:00
color: $link-color-hover
2014-07-12 21:22:47 +02:00
2014-07-12 02:00:18 +02:00
&:active
transition: none
2015-08-02 21:15:22 +02:00
color: darken($link-color, 20%)
2014-07-12 21:22:47 +02:00
2014-07-12 02:00:18 +02:00
h1 &,
h2 &,
h3 &
color: $headings-color
// Lists
/////////////////////////////////////
ul,
ol
margin-top: 0
margin-bottom: $line-height-computed
2015-06-10 22:31:03 +02:00
padding-left: $line-height-computed*2
2014-07-12 02:00:18 +02:00
2014-07-13 01:38:21 +02:00
> li
2015-06-10 22:31:03 +02:00
margin-bottom: ($line-height-computed/2)
2014-07-13 01:38:21 +02:00
position: relative
2014-07-12 21:22:47 +02:00
2014-07-12 02:00:18 +02:00
ol
2014-07-12 21:22:47 +02:00
counter-reset: ol-counter
2015-06-10 22:31:03 +02:00
list-style: none
2014-07-12 02:00:18 +02:00
li
&:before
2014-07-13 01:38:21 +02:00
@extend .textcenter
2014-07-12 21:22:47 +02:00
position: absolute
2015-06-10 22:31:03 +02:00
left: -($line-height-computed*2)
top: -1px
content: counter(ol-counter)'.'
2014-07-12 21:22:47 +02:00
counter-increment: ol-counter
2015-06-10 22:31:03 +02:00
color: $text-color-light
2014-07-12 21:22:47 +02:00
font-style: italic
2015-06-10 22:31:03 +02:00
width: $font-size-base
2014-07-12 21:22:47 +02:00
display: block
2015-06-10 22:31:03 +02:00
user-select: none
2014-07-12 02:00:18 +02:00
ul,
ol
ul,
ol
margin-bottom: 0
// List options
// Unstyled keeps list items block level, just removes default browser padding and list-style
2014-07-12 21:22:47 +02:00
list-unstyled()
2014-07-12 02:00:18 +02:00
padding-left: 0
list-style: none
display: block
2014-07-12 21:22:47 +02:00
.list-unstyled
list-unstyled()
nav ul,
nav ol
@extend .list-unstyled
2014-07-12 02:00:18 +02:00
// Inline turns list items into inline-block
.list-inline
@extend .list-unstyled
> li
display: inline-block
padding-left: 5px
padding-right: 5px
&:first-child
padding-left: 0
// Inline typography
/////////////////////////////////////
p, li
2014-07-12 21:22:47 +02:00
hyphens: auto
2014-07-12 02:00:18 +02:00
2014-07-12 21:22:47 +02:00
b,
2014-07-12 02:00:18 +02:00
strong,
.bold
2014-07-12 21:22:47 +02:00
font-weight: 700
font-style: normal
2014-07-12 02:00:18 +02:00
2014-08-10 00:52:22 +02:00
em,
.italic
2014-07-12 21:22:47 +02:00
font-style: italic
2014-07-12 02:00:18 +02:00
cite
2014-07-12 21:22:47 +02:00
font-style: normal
2014-07-12 02:00:18 +02:00
hr
@extend .divider-bottom
border: 0
2014-07-12 21:22:47 +02:00
margin-bottom: ($line-height-computed*2)
2014-07-12 02:00:18 +02:00
// Quotes
/////////////////////////////////////
blockquote,
blockquote > p
2014-08-10 00:52:22 +02:00
@extend .italic
2015-06-10 23:41:15 +02:00
color: lighten($text-color, 15%)
2014-07-12 02:00:18 +02:00
blockquote
2015-08-09 21:50:06 +02:00
padding-left: 25px
2014-07-12 02:00:18 +02:00
margin: 0 0 $line-height-computed
2014-08-10 00:52:22 +02:00
position: relative
2015-08-09 21:50:06 +02:00
@media $breakpoint2
padding-left: 40px
2015-04-27 17:01:45 +02:00
@media $breakpoint3
padding: 0 ($line-height-computed*1.75)
2014-08-10 00:52:22 +02:00
// quotation marks
&:before
content: ""
2015-08-09 21:50:06 +02:00
font-size: 250%
2014-08-10 00:52:22 +02:00
font-family: "Hoefler Text", "Times New Roman", serif
2015-06-10 23:41:15 +02:00
color: $text-color-dimmed
2014-08-10 00:52:22 +02:00
position: absolute
2015-06-11 01:51:55 +02:00
left: 0
top: -20px
2015-04-27 17:01:45 +02:00
@media $breakpoint3
top: -($line-height-computed/1.35)
2014-07-12 21:22:47 +02:00
2014-07-12 02:00:18 +02:00
p:last-child
margin-bottom: 0
// Selection
/////////////////////////////////////
::-moz-selection { background: #2e4f5c; color: #fff; }
2014-07-12 21:22:47 +02:00
::selection { background: #2e4f5c; color: #fff; }