Mobile breakpoint pass -- header especially

This commit is contained in:
Barry Clark 2014-05-17 19:35:15 -04:00
parent 6de8b05f67
commit 84e10c22fa
3 changed files with 59 additions and 33 deletions

View file

@ -23,9 +23,8 @@
<div class="wrapper-masthead"> <div class="wrapper-masthead">
<div class="container"> <div class="container">
<header class="masthead"> <header class="masthead">
<a href="/" class="site-name"><img src="{{ site.avatar }}" class="avatar" /></a> <a href="/" class="avatar"><img src="{{ site.avatar }}" /></a>
<a href="/" class="site-name">{{ site.name }}</a> <a href="/" class="site-name">{{ site.name }}</a>
<br><br>
<p class="site-description">{{ site.description }}</p> <p class="site-description">{{ site.description }}</p>
<nav> <nav>

View file

@ -17,8 +17,6 @@ html {
} }
body { body {
margin: 0 auto;
background: $white; background: $white;
font: 18px/1.4 $helvetica; font: 18px/1.4 $helvetica;
color: $darkGray; color: $darkGray;
@ -27,7 +25,7 @@ body {
.container { .container {
margin: 0 auto; margin: 0 auto;
max-width: 740px; max-width: 740px;
padding: 0 20px; //padding: 0 20px;
width: 100%; width: 100%;
} }
@ -44,9 +42,6 @@ h1, h2, h3, h4, h5, h6 {
h1 { h1 {
font-weight: 400; font-weight: 400;
font-size: 32px; font-size: 32px;
@include mobile {
font-size: 32px;
}
a { a {
color: inherit; color: inherit;
} }
@ -54,16 +49,10 @@ h1 {
h2 { h2 {
font-size: 26px; font-size: 26px;
@include mobile {
font-size: 24px;
}
} }
h3 { h3 {
font-size: 22px; font-size: 22px;
@include mobile {
font-size: 20px;
}
} }
h4 { h4 {
@ -154,15 +143,26 @@ img {
.masthead { .masthead {
padding: 25px 0; padding: 25px 0;
@include mobile {
text-align: center;
}
} }
.avatar { .avatar {
float: left; float: left;
width: 70px; width: 70px;
margin-right: 15px; margin-right: 15px;
@include mobile {
float: none;
display: block;
margin: 0 auto;
}
img {
border-radius: 5px; border-radius: 5px;
} }
}
.site-name { .site-name {
float: left; float: left;
@ -172,7 +172,8 @@ img {
font-size: 28px; font-size: 28px;
letter-spacing: 1px; letter-spacing: 1px;
@include mobile { @include mobile {
font-size: 22px; float: none;
display: block;
} }
text-decoration: none; text-decoration: none;
@ -180,6 +181,7 @@ img {
color: $darkGray; color: $darkGray;
&:hover, &:active { &:hover, &:active {
text-decoration: none; text-decoration: none;
} }
} }
@ -189,6 +191,12 @@ img {
margin: 0; margin: 0;
margin-top: -5px; margin-top: -5px;
color: $darkGray; color: $darkGray;
@include mobile {
float: none;
display: block;
margin: 3px 0;
}
} }
nav { nav {
@ -198,7 +206,10 @@ nav {
font-family: $helveticaNeue; font-family: $helveticaNeue;
font-size: 18px; font-size: 18px;
@include mobile { @include mobile {
font-size: 18px; float: none;
display: block;
margin-top: 15px;
font-size: 16px;
} }
// nav has it's own link highlighting // nav has it's own link highlighting
@ -214,6 +225,10 @@ nav {
cursor: pointer; cursor: pointer;
color: $darkGray; color: $darkGray;
} }
@include mobile {
margin: 0 10px;
}
} }
} }
@ -250,6 +265,7 @@ nav {
} }
.wrapper-footer { .wrapper-footer {
margin-top: 50px;
background-color: #eee; background-color: #eee;
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
} }

View file

@ -318,7 +318,6 @@ html {
font-size: 100%; } font-size: 100%; }
body { body {
margin: 0 auto;
background: white; background: white;
font: 18px/1.4 Helvetica, Arial, sans-serif; font: 18px/1.4 Helvetica, Arial, sans-serif;
color: #333333; } color: #333333; }
@ -326,7 +325,6 @@ body {
.container { .container {
margin: 0 auto; margin: 0 auto;
max-width: 740px; max-width: 740px;
padding: 0 20px;
width: 100%; } width: 100%; }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
@ -340,23 +338,14 @@ h1, h2, h3, h4, h5, h6 {
h1 { h1 {
font-weight: 400; font-weight: 400;
font-size: 32px; } font-size: 32px; }
@media screen and (max-width: 520px) {
h1 {
font-size: 32px; } }
h1 a { h1 a {
color: inherit; } color: inherit; }
h2 { h2 {
font-size: 26px; } font-size: 26px; }
@media screen and (max-width: 520px) {
h2 {
font-size: 24px; } }
h3 { h3 {
font-size: 22px; } font-size: 22px; }
@media screen and (max-width: 520px) {
h3 {
font-size: 20px; } }
h4 { h4 {
font-size: 18px; font-size: 18px;
@ -420,11 +409,20 @@ img {
.masthead { .masthead {
padding: 25px 0; } padding: 25px 0; }
@media screen and (max-width: 520px) {
.masthead {
text-align: center; } }
.avatar { .avatar {
float: left; float: left;
width: 70px; width: 70px;
margin-right: 15px; margin-right: 15px; }
@media screen and (max-width: 520px) {
.avatar {
float: none;
display: block;
margin: 0 auto; } }
.avatar img {
border-radius: 5px; } border-radius: 5px; }
.site-name { .site-name {
@ -438,7 +436,8 @@ img {
color: #333333; } color: #333333; }
@media screen and (max-width: 520px) { @media screen and (max-width: 520px) {
.site-name { .site-name {
font-size: 22px; } } float: none;
display: block; } }
.site-name:hover, .site-name:active { .site-name:hover, .site-name:active {
text-decoration: none; } text-decoration: none; }
@ -448,6 +447,11 @@ img {
margin: 0; margin: 0;
margin-top: -5px; margin-top: -5px;
color: #333333; } color: #333333; }
@media screen and (max-width: 520px) {
.site-description {
float: none;
display: block;
margin: 3px 0; } }
nav { nav {
float: right; float: right;
@ -456,7 +460,10 @@ nav {
font-size: 18px; } font-size: 18px; }
@media screen and (max-width: 520px) { @media screen and (max-width: 520px) {
nav { nav {
font-size: 18px; } } float: none;
display: block;
margin-top: 15px;
font-size: 16px; } }
nav a { nav a {
margin-left: 25px; margin-left: 25px;
text-align: right; text-align: right;
@ -467,6 +474,9 @@ nav {
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
color: #333333; } color: #333333; }
@media screen and (max-width: 520px) {
nav a {
margin: 0 10px; } }
@media screen and (max-width: 520px) { @media screen and (max-width: 520px) {
.logo, nav { .logo, nav {
@ -488,6 +498,7 @@ nav {
color: #666666; } color: #666666; }
.wrapper-footer { .wrapper-footer {
margin-top: 50px;
background-color: #eeeeee; background-color: #eeeeee;
border-top: 1px solid #dddddd; } border-top: 1px solid #dddddd; }