hacks-guide-minimal-mistake.../assets/_scss/_sidebar.scss

114 lines
2.3 KiB
SCSS
Raw Normal View History

2016-03-11 04:29:30 +01:00
/* ==========================================================================
SIDEBAR
========================================================================== */
2016-03-20 20:20:33 +01:00
/*
Default
========================================================================== */
2016-03-11 04:29:30 +01:00
.sidebar {
@include clearfix();
margin-bottom: 2em;
padding-bottom: 1em;
2016-03-20 20:20:33 +01:00
@include breakpoint($large) {
@include span(2 of 12);
2016-03-17 20:50:22 +01:00
@include suffix(0.25 of 12);
2016-03-11 04:29:30 +01:00
}
@include breakpoint($x-large) {
padding-right: 0;
}
h2, h3, h4, h5, h6 {
margin-bottom: 0;
font-family: $sans-serif-narrow;
}
p, li {
font-size: 14px;
}
img {
width: 100%;
}
2016-03-11 04:29:30 +01:00
}
2016-03-20 20:20:33 +01:00
.sidebar__right {
@include breakpoint($medium) {
position: absolute;
top: 0;
right: 1em;
width: $right-sidebar-width-narrow;
padding-left: 2em;
@include breakpoint($large) {
width: $right-sidebar-width;
}
@include breakpoint($x-large) {
width: $right-sidebar-width-wide;
}
}
@include breakpoint($large) {
right: calc(50% - (0.5 * #{$large}) + 1em); // 50% - 1/2 of wrapper's max-width + wrapper padding
}
@include breakpoint($x-large) {
right: calc(50% - (0.5 * #{$x-large}) + 1em); // 50% - 1/2 of wrapper's max-width + wrapper padding
}
}
2016-03-11 04:29:30 +01:00
/*
Author profile and links
========================================================================== */
.author__avatar {
float: left;
width: 50px;
margin-right: 10px;
2016-03-20 20:20:33 +01:00
@include breakpoint($large) {
float: none;
width: initial;
}
img {
max-width: 110px;
border-radius: 50%;
}
}
.author__content {
float: right;
width: calc(100% - 60px); // subtract avatar width + any margin/padding
2016-03-20 20:20:33 +01:00
@include breakpoint($large) {
float: none;
width: 100%;
}
}
2016-03-11 04:29:30 +01:00
.author__name {
margin: 0;
2016-03-11 04:29:30 +01:00
font-family: $sans-serif-narrow;
font-size: 20px;
2016-03-20 20:20:33 +01:00
@include breakpoint($large) {
margin-top: 10px;
margin-bottom: 10px;
}
2016-03-11 04:29:30 +01:00
}
.author__bio {
margin-bottom: 10px;
font-size: 14px;
2016-03-15 03:00:19 +01:00
font-style: italic;
2016-03-20 20:20:33 +01:00
@include breakpoint($large) {
margin-bottom: 20px;
}
2016-03-11 04:29:30 +01:00
}
.author__urls {
a {
display: inline-block;
margin-bottom: 5px;
padding-right: 5px;
font-size: 14px;
text-decoration: none;
2016-03-20 20:20:33 +01:00
@include breakpoint($large) {
2016-03-19 01:54:28 +01:00
display: block;
}
&:hover {
text-decoration: underline;
}
2016-03-11 04:29:30 +01:00
}
2016-03-15 17:54:50 +01:00
}