hacks-guide-minimal-mistake.../assets/scss/_toc.scss

64 lines
1.4 KiB
SCSS
Raw Normal View History

2016-03-10 17:13:54 +01:00
/* ==========================================================================
TABLE OF CONTENTS
========================================================================== */
.toc {
2016-03-15 04:02:06 +01:00
padding: 0 0 1em;
2016-03-10 17:13:54 +01:00
font-family: $sans-serif-narrow;
2016-03-15 04:02:06 +01:00
color: $gray;
text-transform: uppercase;
letter-spacing: 1px;
background-color: #fff;
2016-03-17 20:50:22 +01:00
@include breakpoint($large) {
position: absolute;
top: 0;
right: calc(50% - 512px + 1em); // 50% - 1/2 of wrapper's max-width + wrapper padding
width: $right-sidebar-width;
padding-left: 2em;
}
2016-03-10 17:13:54 +01:00
}
.toc__title {
2016-03-15 04:02:06 +01:00
margin: 0;
padding: 10px 20px;
font-family: $sans-serif-narrow;
font-size: 16px;
border: 1px solid $border-color;
border-top-left-radius: $border-radius;
border-top-right-radius: $border-radius;
background: mix(#fff, $light-gray, 50%);
2016-03-10 17:13:54 +01:00
}
.toc__menu {
2016-03-15 04:02:06 +01:00
margin: 0;
padding: 0;
width: 100%;
list-style: none;
border: 1px solid $border-color;
border-top: none;
border-bottom-right-radius: $border-radius;
border-bottom-left-radius: $border-radius;
a {
2016-03-10 17:13:54 +01:00
display: block;
2016-03-15 04:02:06 +01:00
padding: 10px 20px;
color: $gray;
2016-03-15 04:02:06 +01:00
font-size: 11px;
2016-03-10 17:13:54 +01:00
font-weight: bold;
2016-03-15 04:02:06 +01:00
line-height: 1.5;
border-bottom: 1px solid $border-color;
&:hover {
color: #000;
}
2016-03-15 04:02:06 +01:00
}
li ul > li a {
font-weight: normal;
}
// hide sub sub links on small screens
li > ul li {
display: none;
@include breakpoint($large) {
2016-03-10 17:13:54 +01:00
display: block;
}
}
}