Cleanup table of contents styling

This commit is contained in:
Michael Rose 2016-03-14 23:02:06 -04:00
parent add794e05e
commit 72661942cf
4 changed files with 43 additions and 50 deletions

View file

@ -3,67 +3,57 @@
========================================================================== */ ========================================================================== */
.toc { .toc {
padding: 0 1em 1em; padding: 0 0 1em;
font-family: $sans-serif-narrow; font-family: $sans-serif-narrow;
border-top: 8px solid $gray; color: $gray;
text-transform: uppercase;
letter-spacing: 1px;
background-color: #fff;
@include breakpoint($large) { @include breakpoint($large) {
display: block; display: block;
@include grid(12,2); @include grid(12,2);
@include prefix(12,0.5);
@include suffix(12,0.5);
position: absolute; position: absolute;
top: 5.5em; top: 0;
right: 0; right: 6.250005%;
} }
} }
.toc__title { .toc__title {
margin: 1em 0; margin: 0;
font-family: $serif; padding: 10px 20px;
font-size: 18px; font-family: $sans-serif-narrow;
color: $gray; 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%);
} }
.toc__menu { .toc__menu {
padding-left: 0; margin: 0;
font-size: 14px; padding: 0;
border-bottom: 2px solid #e2e2e2; width: 100%;
ul { list-style: none;
@include clearfix(); border: 1px solid $border-color;
> li { border-top: none;
padding: 5px 0; border-bottom-right-radius: $border-radius;
font-weight: normal; border-bottom-left-radius: $border-radius;
&:before { a {
content: "\2192";
width: 20px;
}
&:not(:last-child) {
border-bottom: 1px solid $light-gray;
}
}
}
li {
clear: both;
display: block; display: block;
padding: 10px 20px;
font-size: 11px;
font-weight: bold; font-weight: bold;
&:before { line-height: 1.5;
display: block; border-bottom: 1px solid $border-color;
float: left;
margin-right: 10px;
margin-bottom: 5px;
width: 10px;
font-weight: bold;
}
a {
display: block;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
} }
> li { li ul > li a {
padding: 5px 0; font-weight: normal;
border-top: 2px solid $light-gray; }
// hide sub sub links on small screens
li > ul li {
display: none;
@include breakpoint($large) {
display: block;
}
} }
} }

View file

@ -1,5 +1,8 @@
--- ---
title: "Template: Post with Table Of Contents" title: "Template: Post with Table Of Contents"
header:
image: unsplash-image-9.jpg
caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
tags: tags:
- table of contents - table of contents
--- ---
@ -28,7 +31,7 @@ Below is just about everything you'll need to style in the theme. Check the sour
###### Heading 6 ###### Heading 6
### Body text ## Body text
Lorem ipsum dolor sit amet, test link adipiscing elit. **This is strong**. Nullam dignissim convallis est. Quisque aliquam. Lorem ipsum dolor sit amet, test link adipiscing elit. **This is strong**. Nullam dignissim convallis est. Quisque aliquam.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long