|
|
|
// Colors |
|
$color-accent : rgb(141, 179, 89); |
|
$color-text-body : rgb(87, 83, 74); |
|
$color-text-light : rgb(184, 186, 188); |
|
$color-ui-light : lighten($color-text-light, 14%); |
|
// Font stacks |
|
$font-sans-serif : "Helvetica Neue", Helvetica, sans-serif; |
|
$font-serif : Georgia, serif; |
|
|
|
// Set up basic typography |
|
body { |
|
// 16px * 106.25% = 17px |
|
font-size: 106.25%; |
|
color: $color-text-body; |
|
font-family: $font-serif; |
|
font-weight: 400; |
|
padding: 0 1.5em 1.5em; |
|
&.is-sans-serif { |
|
font-family: $font-sans-serif; |
|
} |
|
} |
|
a { |
|
color: $color-accent; |
|
} |
|
|
|
// Custom link underline |
|
// --------------------- |
|
.has-custom-underline { |
|
a { |
|
color: $color-accent; |
|
text-decoration: none; |
|
// Underline via gradient background |
|
background-image: linear-gradient(rgba($color-accent, 0.25) 0%, $color-accent 100%); |
|
background-repeat: repeat-x; |
|
background-size: 1px 1px; |
|
background-position: 0 95%; |
|
// Tweak position + thickness for high res (1.75x and up) displays |
|
@media (-webkit-min-device-pixel-ratio: 1.75), |
|
(min-resolution: 168dpi) { |
|
background-image: linear-gradient(rgba($color-accent, 0.25) 0%, $color-accent 100%); |
|
background-position: 0 93%; |
|
} |
|
// Clear descendors from underline |
|
text-shadow: 3px 0 white, 2px 0 white, 1px 0 white, -1px 0 white, -2px 0 white, -3px 0 white; |
|
&:hover { |
|
color: darken($color-accent, 11%); |
|
background-image: linear-gradient(to bottom, darken($color-accent, 6%) 0%, darken($color-accent, 6%) 100%); |
|
} |
|
// Style selected links (or else text-shadow makes it look crazy ugly) |
|
// Pseudo selectors must go separately, or they break each other |
|
&, |
|
> * { |
|
&::selection { |
|
background-color: lighten($color-accent, 25%); |
|
color: $color-text-body; |
|
text-shadow: none; |
|
} |
|
&::-moz-selection { |
|
background-color: lighten($color-accent, 25%); |
|
color: $color-text-body; |
|
text-shadow: none; |
|
} |
|
} |
|
} |
|
h1, h2, h3 { |
|
a { |
|
background-size: 1px 2px; |
|
@media (-webkit-min-device-pixel-ratio: 1.75), |
|
(min-resolution: 168dpi) { |
|
background-position: 0 93%; |
|
background-image: linear-gradient($color-accent 0%, $color-accent 100%); |
|
background-size: 1px 1px; |
|
background-position: 0 93%; |
|
} |
|
} |
|
} |
|
} |
|
|
|
// Toggle buttons |
|
// -------------- |
|
button { |
|
position: fixed; |
|
right: 1.5em; |
|
background: $color-ui-light; |
|
border: 0; |
|
padding: 0.25em 0.75em; |
|
color: $color-text-body; |
|
font-family: $font-sans-serif; |
|
font-size: 0.94em; |
|
} |
|
.toggle-underline-class { |
|
top: 5em; |
|
@media (min-width: 975px) { |
|
top: 2em; |
|
} |
|
} |
|
.toggle-font-family { |
|
top: 7.5em; |
|
@media (min-width: 975px) { |
|
top: 4.5em; |
|
} |
|
} |