hacks-guide-minimal-mistake.../_sass/minimal-mistakes/_archive.scss

310 lines
5.1 KiB
SCSS
Raw Normal View History

2016-03-10 19:06:59 +01:00
/* ==========================================================================
ARCHIVE
========================================================================== */
.archive {
margin-bottom: 2em;
2016-03-21 21:36:24 +01:00
@include breakpoint($medium) {
width: span(12 of 12);
}
2016-03-21 21:36:24 +01:00
@include breakpoint($large) {
float: right;
padding-left: gutter(0.5 of 12);
width: span(10 of 12);
}
2016-03-21 21:36:24 +01:00
a {
color: inherit;
text-decoration: none;
}
2016-03-10 19:06:59 +01:00
}
.archive__subtitle {
margin: 1.414em 0 0;
2016-03-10 19:06:59 +01:00
padding-bottom: 0.5em;
font-size: $type-size-5;
2016-03-20 02:50:18 +01:00
color: mix(#fff, $gray, 25%);
2016-03-10 19:06:59 +01:00
border-bottom: 1px solid $border-color;
+ .list__item .archive__item-title {
margin-top: 0.5em;
}
2016-03-10 19:06:59 +01:00
}
.archive__item-title {
margin-bottom: 0.25em;
2016-03-11 04:29:30 +01:00
font-family: $sans-serif-narrow;
a + a {
opacity: 0.5;
}
}
/* remove border*/
.page__content {
.archive__item-title {
margin-top: 1em;
border-bottom: none;
}
2016-03-10 19:06:59 +01:00
}
.archive__item-excerpt {
2016-03-31 04:20:55 +02:00
margin-top: 0;
font-size: $type-size-6;
2016-03-21 21:36:24 +01:00
2016-03-10 19:06:59 +01:00
& + p {
text-indent: 0;
}
}
.archive__item-teaser {
border-radius: $border-radius;
overflow: hidden;
img {
width: 100%;
}
}
.archive__item:hover {
.archive__item-teaser {
box-shadow: 0 0 10px rgba(#000, 0.25);
}
2016-03-21 21:36:24 +01:00
.archive__item-title {
text-decoration: underline;
}
}
2016-03-21 03:15:43 +01:00
/*
List view
========================================================================== */
.list__item {
@include breakpoint($medium) {
padding-right: $right-sidebar-width-narrow;
}
2016-03-21 21:36:24 +01:00
2016-03-21 03:15:43 +01:00
@include breakpoint($large) {
padding-right: $right-sidebar-width;
}
2016-03-21 21:36:24 +01:00
2016-03-21 03:15:43 +01:00
@include breakpoint($x-large) {
padding-right: $right-sidebar-width-wide;
}
.page__meta {
margin: 0 0 4px;
}
2016-03-21 03:15:43 +01:00
}
/*
Grid view
========================================================================== */
.grid__item {
margin-bottom: 2em;
2016-03-21 21:36:24 +01:00
@include breakpoint($small) {
float: left;
width: span(5 of 10);
&:nth-child(2n+1) {
clear: both;
margin-left: 0;
}
&:nth-child(2n+2) {
clear: none;
margin-left: gutter(of 10);
}
}
@include breakpoint($medium) {
margin-left: 0; /* override margin*/
margin-right: 0; /* override margin*/
width: span(3 of 12);
&:nth-child(2n+1) {
clear: none;
}
&:nth-child(4n+1) {
clear: both;
}
&:nth-child(4n+2) {
clear: none;
margin-left: gutter(1 of 12);
}
&:nth-child(4n+3) {
clear: none;
margin-left: gutter(1 of 12);
}
&:nth-child(4n+4) {
clear: none;
margin-left: gutter(1 of 12);
}
}
.page__meta {
margin: 0 0 4px;
}
.archive__item-title {
margin-top: 0.5em;
font-size: $type-size-5;
}
.archive__item-excerpt {
display: none;
2016-03-21 21:36:24 +01:00
@include breakpoint($medium) {
display: block;
font-size: $type-size-6;
}
}
2016-03-21 21:36:24 +01:00
.archive__item-teaser {
2016-03-21 21:36:24 +01:00
@include breakpoint($small) {
max-height: 200px;
}
2016-03-21 21:36:24 +01:00
@include breakpoint($medium) {
max-height: 120px;
}
}
}
/*
Features
========================================================================== */
.feature__wrapper {
@include clearfix();
margin-bottom: 2em;
border-bottom: 1px solid $border-color;
}
.feature__item {
margin-bottom: 2em;
2016-04-01 18:50:07 +02:00
font-size: 1.25rem;
@include breakpoint($small) {
float: left;
margin-bottom: 0;
width: span(4 of 12);
&:nth-child(3n+1) {
clear: both;
margin-left: 0;
}
&:nth-child(3n+2) {
clear: none;
margin-left: gutter(of 12);
}
&:nth-child(3n+3) {
clear: none;
margin-left: gutter(of 12);
}
.feature__item-teaser {
max-height: 200px;
overflow: hidden;
}
}
&--left {
float: left;
margin-left: 0;
margin-right: 0;
width: 100%;
clear: both;
2016-04-01 18:50:07 +02:00
font-size: 1.25rem;
.archive__item-teaser {
margin-bottom: 2em;
}
@include breakpoint($small) {
.archive__item-teaser {
float: left;
width: span(5 of 12);
}
.archive__item-body {
float: right;
padding-left: gutter(0.5 of 12);
padding-right: gutter(1 of 12);
width: span(7 of 12);
}
}
}
&--right {
float: left;
margin-left: 0;
margin-right: 0;
width: 100%;
clear: both;
2016-04-01 18:50:07 +02:00
font-size: 1.25rem;
.archive__item-teaser {
margin-bottom: 2em;
}
@include breakpoint($small) {
text-align: right;
.archive__item-teaser {
float: right;
width: span(5 of 12);
}
.archive__item-body {
float: right;
width: span(7 of 12);
padding-left: gutter(0.5 of 12);
padding-right: gutter(1 of 12);
}
}
}
&--center {
float: left;
margin-left: 0;
margin-right: 0;
width: 100%;
clear: both;
2016-04-01 18:50:07 +02:00
font-size: 1.25rem;
.archive__item-teaser {
margin-bottom: 2em;
}
@include breakpoint($small) {
text-align: center;
.archive__item-teaser {
margin: 0 auto;
width: span(5 of 12);
}
.archive__item-body {
margin: 0 auto;
width: span(7 of 12);
}
}
}
2016-11-17 17:43:37 +01:00
}