samhuri.net/public/css/style.css.less

389 lines
5.8 KiB
Text

/**
* Basic responsive layout from http://www.adamkaplan.me/grid/
*
* The rem to px conversions don't seem to hold on my Dell 2408 display,
* but do seem correct on iOS. Need to look into this.
*/
/* Small screen is the default set of styles */
@screen-iphone-landscape: 35.5rem; /* ~ 568px */
@screen-medium: 40rem; /* ~ 640px */
@screen-large: 64rem; /* ~ 1024px */
body { font-size: 100%; }
@media (min-width: @screen-medium) {
body { font-size: 112%; }
}
@media (min-width: @screen-large) {
body { font-size: 120%; }
}
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.container {
margin: 0 auto;
max-width: 48rem;
width: 90%;
}
@media (min-width: @screen-medium) {
.column {
float: left;
padding-left: 1rem;
padding-right: 1rem;
}
.column.full { width: 100%; }
.column.two-thirds { width: 66.7%; }
.column.half { width: 50%; }
.column.third { width: 33.3%; }
.column.fourth { width: 24.95%; }
.column.flow-opposite { float: right; }
}
/**
* Modern clearfix hack
* http://nicolasgallagher.com/micro-clearfix-hack/
*/
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
/**
* Super barebones responsive images
*/
img {
max-width: 100%;
}
/**
* Site styles
*/
// colors
@background: #f7f7f7;
@text: #222;
@highlight: #a00;
@email-white: #fff;
@rss-orange: #f60;
@twitter-blue: #4099ff;
@github-blue: #4183c4;
// font weight
@weight-thin: 400;
body {
background-color: @background;
color: @text;
font-family: 'museo-sans', 'Helvetica Neue', 'Verdana', 'Roboto', sans-serif;
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Helvetica Neue', 'Verdana', sans-serif;
}
nav {
font-family: 'Helvetica Neue', 'Robot', 'Arial', sans-serif;
}
a {
color: lighten(@highlight, 5%);
}
a:visited {
color: @highlight;
}
header.primary {
background-color: darken(@text, 5%);
color: @background;
padding: 0.4rem 0.8rem;
border-bottom: solid 1px lighten(@text, 40%);
box-shadow: 0 0 12px 2px @text;
.title {
float: left;
}
h1, h4 {
display: inline-block;
margin: 0;
padding: 0;
word-wrap: break-word;
font-family: 'museo-sans';
font-weight: normal;
}
h1 {
height: 1.3rem;
font-size: 1.3rem;
a, a:visited {
color: @background;
}
}
h4 {
height: 0.8rem;
font-size: 0.8rem;
color: darken(@background, 10%);
}
h4 a {
color: darken(@background, 10%);
text-decoration: none;
}
h4 a:hover {
color: @background;
text-decoration: underline;
}
nav {
padding-top: 0.5rem;
clear: left;
@media (min-width: @screen-iphone-landscape) {
float: right;
clear: none;
padding: 0.65rem 0;
height: 1rem;
}
a, a:visited {
color: @highlight;
}
ul {
margin: 0;
padding: 0;
li {
display: inline-block;
list-style-type: none;
padding: 0.1rem 0.4rem;
font-size: 0.95rem;
text-transform: uppercase;
}
li i.fa {
font-size: 1.1rem;
color: darken(@background, 10%);
-o-transition: 0.2s;
-ms-transition: 0.2s;
-moz-transition: 0.2s;
-webkit-transition: 0.2s;
transition: 0.2s;
}
li.email i.fa:hover {
color: @email-white, 10%;
}
li.rss i.fa:hover {
color: desaturate(@rss-orange, 20%);
}
li.twitter i.fa:hover {
color: desaturate(@twitter-blue, 20%);
}
li.github i.fa:hover {
color: @github-blue;
}
} /* ul */
} /* nav */
} /* header.primary */
/* Improve colours in mobile Safari ... wish I could include desktop Safari somehow */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
header.primary nav {
a, a:visited {
color: lighten(@highlight, 10%);
}
}
}
footer {
padding: 1rem 0;
text-align: center;
color: lighten(@text, 30%);
a, a:visited {
text-decoration: none;
color: lighten(@text, 30%);
}
}
/**
* Archive
*/
ul.archive {
padding-left: 0;
margin-left: 5%;
margin-bottom: 2rem;
list-style-type: none;
@media (min-width: @screen-medium) {
margin-right: 5%;
}
li {
margin: 0.8rem 0;
a {
text-decoration: none;
}
.date {
font-size: 80%;
padding-left: 0.5rem;
color: lighten(@text, 30%);
// float: right;
} /* .date */
} /* li */
} /* ul.archive */
/**
* Projects
*/
.project-listing {
margin-bottom: 1rem;
h4, p {
margin: 0.5rem 0;
}
}
.project-stats {
text-align: center;
margin: 2rem 0;
a {
padding: 0 0.3rem;
}
}
body.projects:not(.index) .container {
h2, h4 {
text-align: center;
}
}
.project-info {
h3 {
text-align: center;
margin-bottom: 0.2rem;
}
.column {
margin-bottom: 2rem;
}
ul {
padding-left: 0;
text-align: center;
li {
list-style-type: none;
}
}
}
/**
* Posts
*/
article {
word-wrap: break-word;
header {
h2 {
word-wrap: break-word;
margin-bottom: 0.3rem;
}
time {
margin-top: 0.3rem;
color: lighten(@text, 35%);
font-family: 'Helvetica Neue', 'Verdana', sans-serif;
}
}
p.fin {
text-align: center;
color: darken(@background, 20%);
margin: 1rem 0;
}
}
blockquote {
margin-left: 6%;
font-family: 'Helvetica Neue', 'Verdana', 'Roboto', sans-serif;
font-style: italic;
color: lighten(@text, 15%);
}
blockquote:before {
content: '\201F'; // left double curly quote
float: left;
margin-top: -0.35rem;
margin-left: -1rem;
font-size: 150%;
}
ul.audio li {
height: 2rem;
margin: 0.5rem 0;
}
ul.audio audio {
vertical-align: middle;
}
pre {
background-color: darken(@background, 5%);
padding: 0.5rem;
}
pre.line-numbers {
float: left;
margin-top: 0;
color: #888;
}