hackertours-theme/sass/_zen.scss
2017-05-27 23:15:52 +02:00

308 lines
3.8 KiB
SCSS

/**
* @file
* Zen custom styles
*/
/* Zen overrides */
p,
pre {
// Set 1 unit of vertical rhythm on the top and bottom margin.
@include margin(.75 0);
}
/* Apply smaller text to blocks, footer etc. */
th,
label,
legend,
figcaption {
@include type-layout(s, 1);
@include respond-to(xxl) {
@include type-layout(s-2, 1);
}
}
article > header,
.footer {
@include type-layout(xs, 1);
@include respond-to(xxl) {
@include type-layout(xs-2, 1);
}
}
/* Apply heading font stack to heading, labels etc. */
h1,
h2,
h3,
th,
nav,
label,
legend,
article > header,
.header,
.footer {
@include typeface(headings);
color: color(headings);
font-weight: normal;
}
article > .content,
aside {
ul {
@extend %ul-straight-left;
}
ol {
@extend %ol-straight-left;
}
}
article {
& > header {
color: color('grey');
p {
@include margin(.2 0);
}
}
.submitted,
.tags {
@include respond-to(l) {
display: inline-block;
padding-right: 1rem;
}
}
.tags {
ul {
margin: 0;
padding: 0;
}
ul,
li {
display: inline;
}
li {
list-style-type: none;
}
a {
@include padding-right(.2);
}
}
code {
@include type-layout(s, 1);
word-wrap: break-word;
}
pre {
color: color(headings);
border-radius: 3px;
padding: 5px;
border: 1px solid color(border);
background-color: color(text-bg);
overflow: auto;
max-height: 250px;
max-width: 550px;
& > code {
display: inline-block;
white-space: pre;
}
}
}
.title-submitted {
margin-bottom: 0;
}
figure {
@include respond-to(s) {
display: table;
img {
display: block;
}
&.left {
@include padding(0 .5 .5 0);
margin: 0;
float: left;
clear: both;
figcaption {
@include padding(0 .5 .5 0);
}
}
&.right {
@include padding(0 0 .5 .5);
margin: 0;
float: right;
clear: both;
figcaption {
@include padding(0 0 .5 .5);
}
}
}
}
figcaption {
@include respond-to(s) {
display: table-caption;
caption-side: bottom;
}
h4,
p {
margin: 0;
}
}
/* Page */
body {
background-color: color(backdrop);
}
.layout-center {
background-color: color(body-bg);
}
.header {
padding-top: $zen-gutters / 2;
@include respond-to(m) {
padding-top: $zen-gutters;
}
&__logo {
@include respond-to(s) {
float: left;
}
}
&__site-name {
@include respond-to(s) {
float: left;
}
}
&__region {
@include respond-to(s) {
float: right;
clear: none;
}
}
}
/* Navigation */
.main-menu {
@include margin-top(.5);
@include margin-bottom(.5);
outline: 0;
li {
@include margin-right(.5);
@include margin-bottom(.5);
padding: 0;
}
a {
display: block;
background-color: color(brand);
color: color(text-bg);
padding: 2px 8px;
text-decoration: none;
&:hover,
&:focus {
background-color: color(brand-dark);
}
&:active,
&.active {
background-color: color(brand);
text-decoration: underline;
}
}
}
.menu a.active {
text-decoration: none;
}
.footer {
@include margin-top(1.5);
@include padding(.5 0);
text-align: center;
border-top: 2px solid color(brand);
p {
margin: 0;
}
}
/* Search */
.search-form {
@include padding-top(.5);
}
.search-text {
@include type-layout(l, 1);
}
/* Print. */
aside,
nav,
footer {
@extend %print-none;
}
@media print {
body,
.layout-center {
background-color: color(white);
}
.layout-swap {
padding-top: 0;
}
[role='main'] {
width: 100%;
}
.layout-swap__top {
border-bottom: 0;
}
/* Zen overrides */
:link,
:visited {
text-decoration: underline;
}
a[href]::after {
content: '';
}
}