Better styles file structure, #10
This commit is contained in:
parent
b46caa1eda
commit
403501335e
157
_sass/_theme.scss
Normal file
157
_sass/_theme.scss
Normal file
|
@ -0,0 +1,157 @@
|
||||||
|
// Structural elements
|
||||||
|
body {
|
||||||
|
background: $color__site--background;
|
||||||
|
color: $color__site--body;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
@include flex-direction(column);
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 90%;
|
||||||
|
max-width: 900px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Header, feature and footer
|
||||||
|
.header,
|
||||||
|
.footer {
|
||||||
|
.container {
|
||||||
|
padding: 1rem 0;
|
||||||
|
@include flexbox;
|
||||||
|
@include flex-direction(column);
|
||||||
|
@include align-items(center);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
@include breakpoint(break-1) {
|
||||||
|
.container {
|
||||||
|
@include flex-direction(row);
|
||||||
|
@include justify-content(space-between);
|
||||||
|
text-align: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
@include flex(0, 0, auto);
|
||||||
|
background: darken($color__site--background, 10%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 0;
|
||||||
|
border-radius: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
img {
|
||||||
|
width: 4rem;
|
||||||
|
height: 4rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.small {
|
||||||
|
padding-top: .6rem;
|
||||||
|
color: $color__site--captions;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
border-top: 1px solid darken($color__site--background, 15%);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Nav and copyright
|
||||||
|
.nav {
|
||||||
|
&--paginator {
|
||||||
|
@include flexbox;
|
||||||
|
@include justify-content(center);
|
||||||
|
color: $color__site--captions;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
margin: 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Main content
|
||||||
|
.main {
|
||||||
|
@include flexbox;
|
||||||
|
@include flex-direction(column);
|
||||||
|
@include flex(1, 0, auto);
|
||||||
|
margin-bottom: 1.6rem;
|
||||||
|
@include breakpoint(break-1) {
|
||||||
|
@include flex-direction(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Lists
|
||||||
|
.list {
|
||||||
|
&--posts {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
&--nav {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
.item--post {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
&--nav {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 1rem;
|
||||||
|
&:first-of-type {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&--current {
|
||||||
|
a {
|
||||||
|
color: $color__site--link--current;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Images and media elements
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
audio,
|
||||||
|
video {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Text selection
|
||||||
|
::selection {
|
||||||
|
background: $color__site--heading;
|
||||||
|
color: $color__site--background;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Sassline overrides
|
||||||
|
.typeset {
|
||||||
|
.button,
|
||||||
|
button {
|
||||||
|
background-image: none;
|
||||||
|
text-shadow: none;
|
||||||
|
color: lighten(invert($color__site--body), 15%);
|
||||||
|
&:hover,
|
||||||
|
&:active,
|
||||||
|
&:focus {
|
||||||
|
background-image: none;
|
||||||
|
color: lighten(invert($color__site--body), 15%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
11
_sass/garth.scss
Normal file
11
_sass/garth.scss
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
@charset "utf-8";
|
||||||
|
|
||||||
|
// Import frameworks & theme styles
|
||||||
|
@import
|
||||||
|
"normalize",
|
||||||
|
"colors",
|
||||||
|
"sassline-base",
|
||||||
|
"syntax",
|
||||||
|
"flex",
|
||||||
|
"theme"
|
||||||
|
;
|
|
@ -2,170 +2,4 @@
|
||||||
title: false
|
title: false
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@import "garth";
|
||||||
// Frameworks & Imports
|
|
||||||
@charset "utf-8";
|
|
||||||
@import "colors.scss";
|
|
||||||
@import "normalize";
|
|
||||||
@import "sassline-base";
|
|
||||||
@import "syntax";
|
|
||||||
@import "flex";
|
|
||||||
|
|
||||||
|
|
||||||
// Structural elements
|
|
||||||
body {
|
|
||||||
background: $color__site--background;
|
|
||||||
color: $color__site--body;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
@include flex-direction(column);
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
width: 90%;
|
|
||||||
max-width: 900px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Header, feature and footer
|
|
||||||
.header,
|
|
||||||
.footer {
|
|
||||||
.container {
|
|
||||||
padding: 1rem 0;
|
|
||||||
@include flexbox;
|
|
||||||
@include flex-direction(column);
|
|
||||||
@include align-items(center);
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
@include breakpoint(break-1) {
|
|
||||||
.container {
|
|
||||||
@include flex-direction(row);
|
|
||||||
@include justify-content(space-between);
|
|
||||||
text-align: inherit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
@include flex(0, 0, auto);
|
|
||||||
background: darken($color__site--background, 10%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
display: inline-block;
|
|
||||||
line-height: 0;
|
|
||||||
border-radius: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
img {
|
|
||||||
width: 4rem;
|
|
||||||
height: 4rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.small {
|
|
||||||
padding-top: .6rem;
|
|
||||||
color: $color__site--captions;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
border-top: 1px solid darken($color__site--background, 15%);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Nav and copyright
|
|
||||||
.nav {
|
|
||||||
&--paginator {
|
|
||||||
@include flexbox;
|
|
||||||
@include justify-content(center);
|
|
||||||
color: $color__site--captions;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.pagination {
|
|
||||||
margin: 0 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Main content
|
|
||||||
.main {
|
|
||||||
@include flexbox;
|
|
||||||
@include flex-direction(column);
|
|
||||||
@include flex(1, 0, auto);
|
|
||||||
margin-bottom: 1.6rem;
|
|
||||||
@include breakpoint(break-1) {
|
|
||||||
@include flex-direction(row);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Lists
|
|
||||||
.list {
|
|
||||||
&--posts {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
&--nav {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
.item--post {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item {
|
|
||||||
&--nav {
|
|
||||||
display: inline-block;
|
|
||||||
margin-left: 1rem;
|
|
||||||
&:first-of-type {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&--current {
|
|
||||||
a {
|
|
||||||
color: $color__site--link--current;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Images and media elements
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
audio,
|
|
||||||
video {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Text selection
|
|
||||||
::selection {
|
|
||||||
background: $color__site--heading;
|
|
||||||
color: $color__site--background;
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Sassline overrides
|
|
||||||
.typeset {
|
|
||||||
.button,
|
|
||||||
button {
|
|
||||||
background-image: none;
|
|
||||||
text-shadow: none;
|
|
||||||
color: lighten(invert($color__site--body), 15%);
|
|
||||||
&:hover,
|
|
||||||
&:active,
|
|
||||||
&:focus {
|
|
||||||
background-image: none;
|
|
||||||
color: lighten(invert($color__site--body), 15%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
hr {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user