Style refactor (#77)

* Change fonts

* Fix colors and sizes

* Fix link colors

* Fix headings and links

* Fix icon size
This commit is contained in:
Luiz F. A. de Prá 2018-09-14 09:02:58 -03:00 committed by GitHub
parent f83b230aa2
commit 94656f4c79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 124 additions and 75 deletions

View File

@ -13,20 +13,19 @@ body {
display:flex; display:flex;
color: $fg-color; color: $fg-color;
background-color: $bg-color; background-color: $bg-color;
font-family: 'Fira Mono', monospace; font-family: $text-font-family;
font-size: 1.6em; font-size: 1.6em;
font-weight: 400; font-weight: 300;
letter-spacing: 0.0625em;
line-height: 1.8em; line-height: 1.8em;
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { @media only screen and (max-device-width : 768px) {
font-size: 1.4em; font-size: 1.6em;
line-height: 1.6em; line-height: 1.6em;
} }
} }
a { a {
font-weight: 700; font-weight: 300;
color: $alt-fg-color; color: $link-color;
text-decoration: none; text-decoration: none;
&:focus, &:focus,
&:hover { &:hover {
@ -35,17 +34,7 @@ a {
} }
p { p {
margin: 1.6rem 0 1.6rem 0; margin: 2.0rem 0 2.0rem 0;
a {
font-weight: 400;
color: $alt-fg-color;
text-decoration: underline;
text-underline-position: under;
&:focus,
&:hover {
color: $link-color;
}
}
} }
h1, h1,
@ -54,73 +43,94 @@ h3,
h4, h4,
h5, h5,
h6 { h6 {
font-family: $heading-font-family;
font-weight: 700;
color: $alt-fg-color; color: $alt-fg-color;
text-transform: uppercase; margin: 6.4rem 0 3.2rem 0;
letter-spacing: 0.0625em;
margin: 3.2rem 0 1.6rem 0;
} }
h1 { h1 {
font-size: 3.2rem; font-size: 3.2rem;
line-height: 3.2rem; line-height: 3.6rem;
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { @media only screen and (max-device-width : 768px) {
font-size: 2.8rem; font-size: 3.0rem;
line-height: 2.8rem; line-height: 3.4rem;
} }
} }
h2 { h2 {
font-size: 2.8rem; font-size: 2.8rem;
line-height: 2.8rem; line-height: 3.2rem;
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { @media only screen and (max-device-width : 768px) {
font-size: 2.4rem; font-size: 2.6rem;
line-height: 2.4rem; line-height: 3.0rem;
} }
} }
h3 { h3 {
font-size: 2.4rem; font-size: 2.4rem;
line-height: 2.4rem; line-height: 2.8rem;
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { @media only screen and (max-device-width : 768px) {
font-size: 2.0rem; font-size: 2.2rem;
line-height: 2.0rem; line-height: 2.6rem;
} }
} }
h4 { h4 {
font-size: 2.2rem; font-size: 2.2rem;
line-height: 2.2rem; line-height: 2.6rem;
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { @media only screen and (max-device-width : 768px) {
font-size: 1.8rem; font-size: 2.0rem;
line-height: 1.8rem; line-height: 2.4rem;
} }
} }
h5 { h5 {
font-size: 2.0rem; font-size: 2.0rem;
line-height: 2.0rem; line-height: 2.4rem;
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { @media only screen and (max-device-width : 768px) {
font-size: 1.6rem; font-size: 1.8rem;
line-height: 1.6rem; line-height: 2.2rem;
} }
} }
h6 { h6 {
font-size: 1.4rem; font-size: 1.8rem;
line-height: 1.4rem; line-height: 2.2rem;
@media only screen and (max-device-width : 768px) {
font-size: 1.6rem;
line-height: 2.0rem;
}
}
b, strong {
font-weight: 700;
} }
pre { pre {
margin: 1.6rem 0 1.0rem 0; display: block;
padding: 1.6rem; font-family: $code-font-family;
font-size: 1.6rem;
font-weight: 400;
line-height: 2.6rem;
margin: 2.0rem 0 2.0rem 0;
padding: 2.0rem;
overflow-x: auto; overflow-x: auto;
code {
background-color: inherit;
color: inherit;
}
} }
code { code {
display: inline-block; font-family: $code-font-family;
background-color: $alt-fg-color; font-size: 1.6rem;
color: $bg-color; font-weight: 400;
padding: 0.4rem 0.8rem 0.4rem 0.8rem; background-color: $alt-bg-color;
color: $fg-color;
padding: 0.2rem 0.4rem 0.2rem 0.4rem;
} }
blockquote { blockquote {
border-left: 2px solid $alt-bg-color; border-left: 2px solid $alt-bg-color;
padding-left: 1.6rem; padding-left: 2.0rem;
line-height: 2.2rem;
font-weight: 400;
font-style: italic; font-style: italic;
} }
@ -155,18 +165,27 @@ img {
.wrapper { .wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 100vh; min-height: 100vh;
width: 100%; width: 100%;
} }
.container { .container {
margin: 0 auto; margin: 0 auto;
max-width: 120.0rem; max-width: 90.0rem;
width: 100%; width: 100%;
padding-left: 2.0rem; padding-left: 2.0rem;
padding-right: 2.0rem; padding-right: 2.0rem;
} }
.fab {
font-weight: 400;
}
.fas {
font-weight: 700;
}
.float-right { .float-right {
float: right; float: right;
} }

View File

@ -1,6 +0,0 @@
// Colors
$bg-color: #fefefe !default;
$fg-color: #323232 !default;
$alt-bg-color: #dcdcdc !default;
$alt-fg-color: #000 !default;
$link-color: #3366CC !default;

View File

@ -4,15 +4,16 @@
margin-bottom: 3.2rem; margin-bottom: 3.2rem;
article { article {
header { header {
margin-top: 3.2rem; margin-top: 6.4rem;
margin-bottom: 3.2rem; margin-bottom: 3.2rem;
h1, h2 { h1, h2 {
margin: 0; margin: 0;
} }
h2 { h2 {
margin-top: 1.0rem;
font-size: 1.8rem; font-size: 1.8rem;
line-height: 2.2rem;
color: $fg-color; color: $fg-color;
margin-top: 1.8rem;
@media only screen and (max-device-width : 768px) { @media only screen and (max-device-width : 768px) {
font-size: 1.6rem; font-size: 1.6rem;
} }
@ -38,7 +39,6 @@
li { li {
font-size: 1.6rem; font-size: 1.6rem;
@media only screen and (max-device-width : 768px) { @media only screen and (max-device-width : 768px) {
font-size: 1.4rem;
margin: 1.6rem 0 1.6rem 0; margin: 1.6rem 0 1.6rem 0;
} }
span { span {
@ -52,7 +52,14 @@
} }
} }
a { a {
text-transform: uppercase; font-size: 1.8rem;
color: $fg-color;
font-family: $heading-font-family;
font-weight: 700;
&:hover,
&:focus {
color: $link-color
}
} }
} }
} }
@ -85,15 +92,20 @@
display: inline-block; display: inline-block;
position: relative; position: relative;
a { a {
color: $fg-color;
text-transform: uppercase; text-transform: uppercase;
margin-left: 1.0rem; margin-left: 1.0rem;
margin-right: 1.0rem; margin-right: 1.0rem;
font-size: 1.6rem; font-size: 1.6rem;
&:hover,
&:focus {
color: $link-color;
}
@media only screen and (max-device-width : 768px) { @media only screen and (max-device-width : 768px) {
font-size: 1.4rem; font-size: 1.4rem;
} }
i { i {
font-weight: 400; font-size: 3.2rem;
} }
} }
} }

View File

@ -3,4 +3,7 @@
text-align: center; text-align: center;
line-height: 2.0rem; line-height: 2.0rem;
margin-bottom:1.0rem; margin-bottom:1.0rem;
a {
color: $link-color;
}
} }

View File

@ -4,14 +4,21 @@
a, span { a, span {
display: inline; display: inline;
font-size: 1.6rem; font-size: 1.6rem;
text-transform: uppercase; font-family: $heading-font-family;
font-weight: 700;
line-height: 6.0rem; line-height: 6.0rem;
color: $fg-color;
}
a {
&:hover,
&:focus {
color: $link-color
}
}
.navigation-title {
letter-spacing: 0.1rem; letter-spacing: 0.1rem;
@media only screen and (max-device-width : 768px) { text-transform: uppercase;
font-size: 1.4rem;
} }
}
.navigation-list { .navigation-list {
float: right; float: right;
list-style: none; list-style: none;
@ -58,7 +65,6 @@
} }
} }
} }
#menu-toggle { #menu-toggle {
display: none; display: none;
@media only screen and (max-device-width : 768px) { @media only screen and (max-device-width : 768px) {
@ -81,6 +87,10 @@
line-height: 6.0rem; line-height: 6.0rem;
color: $fg-color; color: $fg-color;
cursor: pointer; cursor: pointer;
&:hover,
&:focus {
color: $link-color
}
} }
} }
} }

View File

@ -0,0 +1,11 @@
// Fonts
$text-font-family: Merriweather, Georgia, serif;
$heading-font-family: Lato, Helvetica, sans-serif;
$code-font-family: 'Source Code Pro', 'Lucida Console', monospace;
// Colors
$bg-color: #FAFAFA !default;
$fg-color: #212121 !default;
$alt-bg-color: #E0E0E0 !default;
$alt-fg-color: #000 !default;
$link-color: #1565c0 !default;

View File

@ -1,6 +1,6 @@
@import "_colors"; @import "variables";
@import "_base"; @import "base";
@import "_content"; @import "content";
@import "_navigation"; @import "navigation";
@import "_pagination"; @import "pagination";
@import "_footer"; @import "footer";

View File

@ -14,7 +14,7 @@
<link rel="canonical" href="{{ .Permalink }}"> <link rel="canonical" href="{{ .Permalink }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Mono:400,700"> <link href="https://fonts.googleapis.com/css?family=Lato:400,700|Merriweather:300,700|Source+Code+Pro:400,700" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous" /> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css" integrity="sha256-oSrCnRYXvHG31SBifqP2PM1uje7SJUyX0nTwO2RJV54=" crossorigin="anonymous" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css" integrity="sha256-oSrCnRYXvHG31SBifqP2PM1uje7SJUyX0nTwO2RJV54=" crossorigin="anonymous" />