summaryrefslogtreecommitdiffstats
path: root/site/assets/scss/_toc.scss
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-24 12:33:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-24 12:33:51 +0000
commit3ea39841c8049525e31e9f4d6300f0c60cdb42de (patch)
tree855de60a8872eafb5911acd303aedcdbfe713a73 /site/assets/scss/_toc.scss
parentInital commit. (diff)
downloadbootstrap-html-3ea39841c8049525e31e9f4d6300f0c60cdb42de.tar.xz
bootstrap-html-3ea39841c8049525e31e9f4d6300f0c60cdb42de.zip
Adding upstream version 5.2.3+dfsg.upstream/5.2.3+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'site/assets/scss/_toc.scss')
-rw-r--r--site/assets/scss/_toc.scss87
1 files changed, 87 insertions, 0 deletions
diff --git a/site/assets/scss/_toc.scss b/site/assets/scss/_toc.scss
new file mode 100644
index 0000000..512a11b
--- /dev/null
+++ b/site/assets/scss/_toc.scss
@@ -0,0 +1,87 @@
+// stylelint-disable selector-max-type
+
+.bd-toc {
+ @include media-breakpoint-up(lg) {
+ position: sticky;
+ top: 5rem;
+ right: 0;
+ z-index: 2;
+ height: subtract(100vh, 7rem);
+ overflow-y: auto;
+ }
+
+ nav {
+ @include font-size(.875rem);
+
+ ul {
+ padding-left: 0;
+ margin-bottom: 0;
+ list-style: none;
+
+ ul {
+ padding-left: 1rem;
+ margin-top: .25rem;
+ }
+ }
+
+ li {
+ margin-bottom: .25rem;
+ }
+
+ a {
+ color: inherit;
+
+ &:not(:hover) {
+ text-decoration: none;
+ }
+
+ code {
+ font: inherit;
+ }
+ }
+ }
+}
+
+.bd-toc-toggle {
+ display: flex;
+ align-items: center;
+
+ @include media-breakpoint-down(sm) {
+ justify-content: space-between;
+ width: 100%;
+ }
+
+ @include media-breakpoint-down(md) {
+ border: 1px solid $border-color;
+ @include border-radius(.4rem);
+
+ &:hover,
+ &:focus,
+ &:active,
+ &[aria-expanded="true"] {
+ color: var(--bd-violet);
+ background-color: $white;
+ border-color: var(--bd-violet);
+ }
+
+ &:focus,
+ &[aria-expanded="true"] {
+ box-shadow: 0 0 0 3px rgba(var(--bd-violet-rgb), .25);
+ }
+ }
+}
+
+.bd-toc-collapse {
+ @include media-breakpoint-down(md) {
+ nav {
+ padding: 1.25rem;
+ background-color: var(--bs-gray-100);
+ border: 1px solid $border-color;
+ @include border-radius(.25rem);
+ }
+ }
+
+ @include media-breakpoint-up(md) {
+ display: block !important; // stylelint-disable-line declaration-no-important
+ }
+}