Commit c575e5ae authored by Randall Leeds's avatar Randall Leeds

misc CSS cleaning house

- consistent use of font family variables
- consistent use of variable-ized $white color
- make use of the heading variables
- make .nav-tabs subsume tabbox mixin
- drop underlines from links (let's try it)
- unify .content and media queries
- extract noise class
parent 5cc63b75
...@@ -13,7 +13,6 @@ $baseFontSize: 14px; ...@@ -13,7 +13,6 @@ $baseFontSize: 14px;
//ELEMENT STYLES//////////////////////////////// //ELEMENT STYLES////////////////////////////////
body { body {
background-color: transparent; background-color: transparent;
font-family: $sansFontFamily;
height: 100%; height: 100%;
position: fixed; position: fixed;
width: 100%; width: 100%;
...@@ -30,21 +29,19 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } ...@@ -30,21 +29,19 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }
} }
.sliding-panels > li { .sliding-panels > li {
@extend .content;
@extend .noise;
@include smallshadow(-2px); @include smallshadow(-2px);
@include stretch-y; @include stretch-y;
@include transition(transform .4s); @include transition(transform .4s);
@include translateX(100%); @include translateX(100%);
background: url('../images/noise_1.png');
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
padding: 1em;
padding-top: 3.5em;
left: 1em; left: 1em;
right: 0; right: 0;
&:first-child { &:first-child {
@include box-shadow(none); @include box-shadow(none);
@include translateX(0); @include translateX(0);
...@@ -62,7 +59,7 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } ...@@ -62,7 +59,7 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }
//SIDEBAR LAYOUT//////////////////////////////// //SIDEBAR LAYOUT////////////////////////////////
#wrapper { #wrapper {
background: url('../images/noise_1.png'); @extend .noise;
height: 100%; height: 100%;
margin-left: $heatmap-width + 17px; margin-left: $heatmap-width + 17px;
position: relative; position: relative;
...@@ -151,9 +148,8 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } ...@@ -151,9 +148,8 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }
.label { .label {
font-weight: bold; font-weight: bold;
font-family: $sansFontFamily;
font-size: 13.1px; font-size: 13.1px;
position: absolute;
text-decoration: none;
left: 10px; left: 10px;
right: 2px; right: 2px;
position: absolute; position: absolute;
...@@ -240,6 +236,7 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } ...@@ -240,6 +236,7 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }
} }
footer { footer {
font-family: $sansFontFamily;
text-align: right; text-align: right;
a { @extend .small; } a { @extend .small; }
} }
......
...@@ -157,23 +157,6 @@ $em: 14 / 1em !default; ...@@ -157,23 +157,6 @@ $em: 14 / 1em !default;
} }
} }
@mixin tabbox {
@include box-shadow(2px -10px 13px -8px hsla(0, 0%, 0%, .1) inset);
background: hsla(0, 0%, 99%, 1);
border-top-right-radius: 2em 5em;
border-top-left-radius: 2em 5em;
color: #999;
border: 1px solid $grayLighter;
border-bottom: none;
&:hover {
background: white;
}
&:active {
@include box-shadow( none );
}
}
//ICON IMAGES//////////////////////////////// //ICON IMAGES////////////////////////////////
@mixin icon_resets { @mixin icon_resets {
......
...@@ -3,20 +3,24 @@ ...@@ -3,20 +3,24 @@
@import "reset"; @import "reset";
@import 'base'; @import 'base';
$white: hsl(0, 0, 99%);
$sansFontFamily: "Source Sans Pro", $sansFontFamily; $sansFontFamily: "Source Sans Pro", $sansFontFamily;
$serifFontFamily: "Merriweather", $serifFontFamily; $serifFontFamily: "Merriweather", $serifFontFamily;
$headingsColor: $textColor;
//ELEMENT STYLES//////////////////////////////// //ELEMENT STYLES////////////////////////////////
a { a {
color: $linkColor; color: $linkColor;
&:hover { color: $linkColorHover; } &:hover { color: $linkColorHover; }
text-decoration: none;
} }
body { body {
background-color: $bodyBackground; background-color: $bodyBackground;
color: $textColor; color: $textColor;
font-smoothing: antialiased; font-smoothing: antialiased;
-webkit-font-smoothing: antialiased;
line-height: 1.4; line-height: 1.4;
} }
...@@ -39,7 +43,7 @@ html { ...@@ -39,7 +43,7 @@ html {
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
font-family: $sansFontFamily; font-family: $sansFontFamily;
color: $gray; color: $headingsColor;
} }
h1 { h1 {
...@@ -261,7 +265,7 @@ button, input[type=submit], .btn { ...@@ -261,7 +265,7 @@ button, input[type=submit], .btn {
blockquote { blockquote {
color: $gray; color: $gray;
font-family: "Merriweather"; font-family: $serifFontFamily;
font-size: 1em; font-size: 1em;
margin-bottom: 1em; margin-bottom: 1em;
padding: 0 1em; padding: 0 1em;
...@@ -359,7 +363,6 @@ blockquote { ...@@ -359,7 +363,6 @@ blockquote {
} }
a { a {
text-decoration: none;
color: inherit; color: inherit;
} }
...@@ -377,14 +380,14 @@ blockquote { ...@@ -377,14 +380,14 @@ blockquote {
&:before { &:before {
border-bottom-color: $grayLighter; border-bottom-color: $grayLighter;
border-width: 0 .5em .625em .5em; border-width: 0 .5em .5em .5em;
top: -.675em; top: -.5em;
} }
&:after { &:after {
border-bottom-color: $white; border-bottom-color: $white;
border-width: 0 .5em .625em .5em; border-width: 0 .5em .5em .5em;
top: -.525em; top: -.45em;
z-index: 3; z-index: 3;
} }
...@@ -482,27 +485,40 @@ blockquote { ...@@ -482,27 +485,40 @@ blockquote {
//TABS//////////////////////////////// //TABS////////////////////////////////
.nav-tabs { .nav-tabs {
@include pie-clearfix; @include pie-clearfix;
margin: 0 .5em; margin: 0 .2em;
a {
font-family: $sansFontFamily;
color: $grayDark;
}
& > li > a { & > li {
@include box-shadow(inset 2px -10px 13px -8px hsla(0, 0%, 0%, .1));
background: darken($white, 2%);
border-top-right-radius: 2em 5em;
border-top-left-radius: 2em 5em;
border: .1em solid $grayLighter;
border-bottom: none;
cursor: pointer; cursor: pointer;
float: left; display: inline-block;
line-height: 1; line-height: 1;
padding: .5em 1em;
padding-top: .25em;
margin-right: -.5em; margin-right: -.5em;
margin-bottom: 0; padding: .25em 1em .5em;
position: relative; position: relative;
text-decoration: none;
@include tabbox;
}
& > .active > a { &:hover {
@include box-shadow(none); background: $white;
color: #333; }
font-weight: bold;
background: hsla(0, 0%, 100%, 1); &.active, &:active {
z-index: 90; @include box-shadow(none);
background: $white;
color: #333;
}
&.active {
z-index: 1;
}
} }
} }
...@@ -523,6 +539,11 @@ blockquote { ...@@ -523,6 +539,11 @@ blockquote {
} }
//NOISE///////////
//Provides the noise background
.noise {
background: url("../images/noise_1.png");
}
//PAPER//////////////////////////////// //PAPER////////////////////////////////
...@@ -530,7 +551,7 @@ blockquote { ...@@ -530,7 +551,7 @@ blockquote {
.paper { .paper {
@include border-radius(.2em); @include border-radius(.2em);
@include smallshadow; @include smallshadow;
background: #fff; background: $white;
padding: 1em; padding: 1em;
} }
...@@ -573,10 +594,31 @@ blockquote { ...@@ -573,10 +594,31 @@ blockquote {
} }
//MAIN CONTENT///////
.content {
margin: 0 auto;
padding: 1em;
padding-top: 3.5em;
.domain .favicon {
margin: 0 .5em;
}
.page {
margin-bottom: 1em;
a {
font-weight: bold;
}
}
}
//ANNOTATION//////////////////////////////// //ANNOTATION////////////////////////////////
//This is for everything that is formatted as an annotation. //This is for everything that is formatted as an annotation.
.annotation { .annotation {
@include pie-clearfix; @include pie-clearfix;
font-family: $sansFontFamily;
position: relative; position: relative;
.user { .user {
...@@ -771,3 +813,56 @@ blockquote { ...@@ -771,3 +813,56 @@ blockquote {
display: none; display: none;
} }
} }
/*
Mobile layout
240-479 px
Zoomed out below 320 px
*/
@media screen and (min-width: 15em) {
.content { padding: 3em 1em; }
}
/*
Wide mobile layout
480-767 px
Zoomed in above 480 px
*/
@media screen and (min-width: 30em) {
}
/*
Tablet layout
600-911 px
Zoomed in above 600 px
*/
@media screen and (min-width: 37.5em) {
.content { padding: 6em; }
}
/*
Widescreen layout
912-1887 px
Zoomed in above 912 px
*/
@media screen and (min-width: 57em) {
.content {
max-width: grid(12);
margin: auto;
}
}
/*
Huge-screen layout
1888-2520 px
Zoomed in above 1920 px
*/
@media screen and (min-width: 118em) {
}
...@@ -8,6 +8,7 @@ $baseFontSize: 18px; ...@@ -8,6 +8,7 @@ $baseFontSize: 18px;
@import "common"; @import "common";
body { body {
@extend .noise;
font-family: $serifFontFamily; font-family: $serifFontFamily;
} }
...@@ -42,10 +43,6 @@ ol { ...@@ -42,10 +43,6 @@ ol {
border: 1px dashed $gray; border: 1px dashed $gray;
} }
.content {
padding: 1em;
}
#toolbar { #toolbar {
font-size: .9em; font-size: .9em;
position: absolute; position: absolute;
...@@ -72,10 +69,9 @@ hgroup { ...@@ -72,10 +69,9 @@ hgroup {
@media screen and (min-width: 15em) { @media screen and (min-width: 15em) {
.auth { width: 100%; } .auth { width: 100%; }
.content { padding: 4em 2em; }
header { header {
margin: 0 -2em 2em; margin-bottom: 2em;
text-align: center; text-align: center;
} }
} }
...@@ -94,8 +90,6 @@ hgroup { ...@@ -94,8 +90,6 @@ hgroup {
text-align: left; text-align: left;
img { float: left; } img { float: left; }
} }
section { margin: 4em 0em; }
} }
/* /*
...@@ -105,7 +99,6 @@ hgroup { ...@@ -105,7 +99,6 @@ hgroup {
*/ */
@media screen and (min-width: 37.5em) { @media screen and (min-width: 37.5em) {
.content { padding: 6em; }
} }
/* /*
...@@ -115,10 +108,6 @@ hgroup { ...@@ -115,10 +108,6 @@ hgroup {
*/ */
@media screen and (min-width: 57em) { @media screen and (min-width: 57em) {
.content {
width: grid(12);
margin: auto;
}
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment