Created
January 6, 2018 21:02
-
-
Save vanaf1979/012bf7bc1caa1d9bfa21bf3959972044 to your computer and use it in GitHub Desktop.
Css helper file to get your typography to behave.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
-- VA79 Typography | |
*/ | |
html, body { | |
font-family: 'Open Sans', Helvetica, sans-serif; | |
font-size: 15px; | |
} | |
* { | |
font-family: 'Open Sans', Helvetica, sans-serif; | |
font-size: 15px; | |
color: #3b343b; | |
font-weight: 300; | |
line-height: 1.8em; | |
letter-spacing: 1.2px; | |
text-size-adjust: 100%; | |
/* | |
-- Below can be used by preverence | |
*/ | |
/*-webkit-font-smoothing: none;*/ | |
/*-webkit-font-smoothing: subpixel-antialiased;*/ | |
/*-webkit-font-smoothing: antialiased;*/ | |
} | |
h1, h1 a, | |
h2, h2 a, | |
h3, h3 a, | |
h4, h4 a, | |
h5, h5 a, | |
h6, h6 a { | |
display: block; | |
font-weight: 400; | |
padding: 0px 0px 0px 0px; | |
margin: 0px 0px 0px 0px; | |
color: #629f51; | |
text-decoration: none; | |
} | |
h1, h1 a { | |
font-size: 2.0rem; | |
line-height: 1.1; | |
margin-bottom: 0.5rem; | |
} | |
h2, h2 a { | |
font-size: 1.8rem; | |
line-height: 1.1; | |
margin-bottom: 0.5rem; | |
} | |
h3, h3 a { | |
font-size: 1.6rem; | |
line-height: 1.1; | |
margin-bottom: 0.5rem; | |
} | |
h4, h4 a { | |
font-size: 1.4rem; | |
line-height: 1.1em; | |
margin-bottom: 0.5rem; | |
} | |
h5, h5 a { | |
font-size: 1.2rem; | |
line-height: 1.1em; | |
margin-bottom: 0.5rem; | |
} | |
h6, h6 a { | |
font-size: 1.0rem; | |
line-height: 1.1em; | |
margin-bottom: 0.5rem; | |
} | |
h1 a:hover, | |
h2 a:hover, | |
h3 a:hover, | |
h4 a:hover, | |
h5 a:hover, | |
h6 a:hover { | |
text-decoration: underline; | |
} | |
p + h1, | |
p + h2, | |
p + h3, | |
p + h4, | |
p + h5, | |
p + h6 { | |
margin-top: 1.5rem; | |
} | |
p { | |
display: inline-block; | |
font-size: 1em; | |
line-height: 1.8rem; | |
margin-bottom: .5rem; | |
padding: 0px 0px 0px 0px; | |
margin: 0px 0px 15px 0px; | |
} | |
p a, | |
p a:link, | |
p a:visited { | |
text-decoration: underline; | |
} | |
p a:hover { | |
text-decoration: none; | |
} | |
a, | |
a:link, | |
a:visited { | |
text-decoration: none; | |
cursor: pointer; | |
outline: 0; | |
} | |
a:hover { | |
text-decoration: underline; | |
} | |
img { | |
display: block; | |
padding: 0px 0px 0px 0px; | |
margin: 0px 0px 0px 0px; | |
} | |
/* | |
-- Wordpress image alignment classes | |
*/ | |
img.alignleft { | |
float: right; | |
margin: 0px 10px 10px 0px; | |
} | |
img.alignright { | |
float: right; | |
margin: 0px 0px 10px 10px; | |
} | |
ul, ol { | |
display: inline-block; | |
line-height: 1.4em; | |
margin-bottom: .5rem; | |
margin-left: 15px; | |
} | |
ul { | |
list-style: initial; | |
} | |
ol { | |
list-style: decimal; | |
} | |
ul.coloured { | |
display: inline-block; | |
list-style: none; | |
line-height: 1.4em; | |
margin-bottom: .5rem; | |
margin-left: 12px; | |
} | |
ul.coloured li:before { | |
content: "•"; | |
font-weight: 700; | |
color: lightblue; | |
display: inline-block; | |
width: 12px; | |
float:left; | |
margin: 1px 0px 0px -12px; | |
} | |
li { | |
line-height: 1.4em; | |
} | |
section, | |
address { | |
font-style: normal; | |
line-height: 1.4rem; | |
} | |
hr { | |
border: none; | |
border-bottom: dotted 1px #bbbbbb; | |
height: 1px; | |
} | |
embed, | |
object { | |
outline: 0; | |
} | |
b, | |
strong { | |
font-weight: 600; | |
} | |
i, | |
em, | |
cite { | |
font-style: italic; | |
} | |
s, | |
del, | |
strike { | |
text-decoration: line-through; | |
} | |
small { | |
font-size: 0.8rem; | |
} | |
big { | |
font-size: 1.2rem; | |
} | |
sup { | |
bottom: 1ex; | |
} | |
sub { | |
top: 0.5ex; | |
} | |
sup, | |
sub { | |
font-size: 0.75rem; | |
height: 0; | |
line-height: 1rem; | |
position: relative; | |
vertical-align: baseline; | |
} | |
dfn, | |
abbr, | |
acronym { | |
border-bottom: 1px dotted #bbbbbb; | |
cursor: help; | |
} | |
pre { | |
display: block; | |
line-height: 1.4em; | |
margin: 10px 0px 10px 0px; | |
padding: 15px 15px 15px 15px; | |
background: #f4f5f6; | |
border-left: solid 2px lightblue; | |
font-family: Courier , monospace; | |
overflow: auto; | |
} | |
aside { | |
display: block; | |
line-height: 1.8em; | |
margin: 10px 0px 10px 0px; | |
padding: 10px 15px 10px 15px; | |
background: #f4f5f6; | |
border-left: solid 2px lightblue; | |
} | |
aside.success { | |
border-left: solid 2px green; | |
} | |
aside.warning { | |
border-left: solid 2px yellow; | |
} | |
aside.danger { | |
border-left: solid 2px red; | |
} | |
blockquote { | |
display: block; | |
line-height: 1.8em; | |
margin: 10px 0px 10px 0px; | |
padding: 10px 15px 10px 15px; | |
background: #f4f5f6; | |
border-left: solid 2px lightblue; | |
} | |
blockquote:before { | |
content: '"'; | |
font-size: 1.5rem; | |
color: #629f51; | |
} | |
blockquote:after { | |
content: '"'; | |
font-size: 1.5rem; | |
color: #629f51; | |
} | |
blockquote p { | |
padding: 0; | |
margin: 0; | |
} | |
@media screen and ( max-width: 568px ) | |
{ | |
html, body { | |
font-size: 17px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment