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

193 lines
3.8 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();
2016-03-21 03:15:43 +01:00
margin-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 {
2016-03-21 03:15:43 +01:00
display: table-cell;
vertical-align: top;
width: 36px;
height: 36px;
2016-03-20 20:20:33 +01:00
@include breakpoint($large) {
2016-03-21 03:15:43 +01:00
display: block;
2016-03-21 17:37:10 +01:00
width: 100%;
height: 100%;
}
img {
max-width: 110px;
border-radius: 50%;
}
}
.author__content {
2016-03-21 03:15:43 +01:00
display: table-cell;
vertical-align: top;
vertical-align: top;
padding-left: 15px;
padding-right: 15px;
line-height: 1;
2016-03-20 20:20:33 +01:00
@include breakpoint($large) {
2016-03-21 03:15:43 +01:00
display: block;
width: 100%;
2016-03-21 03:15:43 +01:00
padding-left: 0;
padding-right: 0;
}
}
2016-03-11 04:29:30 +01:00
.author__name {
margin: 0;
2016-03-21 03:15:43 +01:00
font-size: 18px;
2016-03-20 20:20:33 +01:00
@include breakpoint($large) {
margin-top: 10px;
margin-bottom: 10px;
2016-03-21 03:15:43 +01:00
font-size: 20px;
}
2016-03-11 04:29:30 +01:00
}
2016-03-21 03:15:43 +01:00
.sidebar .author__name {
font-family: $sans-serif;
}
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
}
2016-03-21 05:03:46 +01:00
.author__urls-wrapper {
2016-03-21 03:15:43 +01:00
position: relative;
display: table-cell;
2016-03-21 05:03:46 +01:00
vertical-align: middle;
2016-03-21 03:15:43 +01:00
font-family: $sans-serif;
2016-03-21 05:03:46 +01:00
z-index: 9999;
position: relative;
cursor: pointer;
2016-03-21 03:15:43 +01:00
@include breakpoint($large) {
display: block;
}
2016-03-21 05:03:46 +01:00
.btn {
margin: 0;
padding: 5px 10px;
color: mix(#fff, $gray, 25%);
@include breakpoint($large) {
display: none;
}
2016-03-21 03:15:43 +01:00
}
}
.author__urls {
2016-03-21 03:15:43 +01:00
display: none;
position: absolute;
right: 0;
2016-03-21 05:03:46 +01:00
margin-top: 15px;
2016-03-21 03:15:43 +01:00
padding: 10px;
2016-03-21 05:03:46 +01:00
list-style-type: none;
2016-03-21 03:15:43 +01:00
border: 1px solid $border-color;
border-radius: $border-radius;
2016-03-21 05:03:46 +01:00
background: #fff;
z-index: -1;
box-shadow: 0 0 10px rgba(#000, 0.25);
@include breakpoint($large) {
display: block;
2016-03-21 17:37:10 +01:00
position: relative;
2016-03-21 05:03:46 +01:00
margin: 0;
padding: 0;
border: 0;
2016-03-21 17:37:10 +01:00
background: transparent;
box-shadow: none;
2016-03-21 05:03:46 +01:00
}
&:before {
2016-03-21 03:15:43 +01:00
content: "";
position: absolute;
border-style: solid;
border-width: 0 10px 10px;
2016-03-21 05:03:46 +01:00
border-color: $border-color transparent;
2016-03-21 03:15:43 +01:00
display: block;
width: 0;
2016-03-21 05:03:46 +01:00
z-index: 0;
top: -11px;
2016-03-21 03:15:43 +01:00
left: calc(50% - 10px);
2016-03-21 05:03:46 +01:00
@include breakpoint($large) {
display: none;
}
2016-03-21 03:15:43 +01:00
}
2016-03-21 05:03:46 +01:00
&:after {
content: "";
2016-03-21 03:15:43 +01:00
position: absolute;
border-style: solid;
border-width: 0 10px 10px;
2016-03-21 05:03:46 +01:00
border-color: #fff transparent;
2016-03-21 03:15:43 +01:00
display: block;
width: 0;
2016-03-21 05:03:46 +01:00
z-index: 1;
top: -10px;
2016-03-21 03:15:43 +01:00
left: calc(50% - 10px);
2016-03-21 05:03:46 +01:00
@include breakpoint($large) {
display: none;
}
2016-03-21 03:15:43 +01:00
}
a {
2016-03-21 03:15:43 +01:00
display: block;
margin-bottom: 5px;
padding-right: 5px;
font-size: 14px;
text-decoration: none;
2016-03-21 03:15:43 +01:00
white-space: nowrap;
&:hover {
text-decoration: underline;
}
2016-03-11 04:29:30 +01:00
}
2016-03-15 17:54:50 +01:00
}