Skip to content

Commit

Permalink
simplify the class used for the containing element
Browse files Browse the repository at this point in the history
  • Loading branch information
afeld committed Nov 22, 2015
1 parent 6c3d048 commit a894aa2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="container">
<div class="row">
<div class="col-sm-4">
<nav id="toc" class="bs-docs-sidebar" data-spy="affix"></nav>
<nav id="toc" class="bs-toc" data-spy="affix"></nav>
</div>
<div class="col-sm-8">
{{ content }}
Expand Down
28 changes: 14 additions & 14 deletions bootstrap-toc.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
}

/* All levels of nav */
.bs-docs-sidebar .nav > li > a {
.bs-toc .nav > li > a {
display: block;
padding: 4px 20px;
font-size: 13px;
font-weight: 500;
color: #767676;
}
.bs-docs-sidebar .nav > li > a:hover,
.bs-docs-sidebar .nav > li > a:focus {
.bs-toc .nav > li > a:hover,
.bs-toc .nav > li > a:focus {
padding-left: 19px;
color: #563d7c;
text-decoration: none;
background-color: transparent;
border-left: 1px solid #563d7c;
}
.bs-docs-sidebar .nav > .active > a,
.bs-docs-sidebar .nav > .active:hover > a,
.bs-docs-sidebar .nav > .active:focus > a {
.bs-toc .nav > .active > a,
.bs-toc .nav > .active:hover > a,
.bs-toc .nav > .active:focus > a {
padding-left: 18px;
font-weight: bold;
color: #563d7c;
Expand All @@ -32,29 +32,29 @@
}

/* Nav: second level (shown on .active) */
.bs-docs-sidebar .nav .nav {
.bs-toc .nav .nav {
display: none; /* Hide by default, but at >768px, show it */
padding-bottom: 10px;
}
.bs-docs-sidebar .nav .nav > li > a {
.bs-toc .nav .nav > li > a {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 30px;
font-size: 12px;
font-weight: normal;
}
.bs-docs-sidebar .nav .nav > li > a:hover,
.bs-docs-sidebar .nav .nav > li > a:focus {
.bs-toc .nav .nav > li > a:hover,
.bs-toc .nav .nav > li > a:focus {
padding-left: 29px;
}
.bs-docs-sidebar .nav .nav > .active > a,
.bs-docs-sidebar .nav .nav > .active:hover > a,
.bs-docs-sidebar .nav .nav > .active:focus > a {
.bs-toc .nav .nav > .active > a,
.bs-toc .nav .nav > .active:hover > a,
.bs-toc .nav .nav > .active:focus > a {
padding-left: 28px;
font-weight: 500;
}

/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */
.bs-docs-sidebar .nav > .active > ul {
.bs-toc .nav > .active > ul {
display: block;
}

0 comments on commit a894aa2

Please sign in to comment.