mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Use has-children
.
This commit is contained in:
parent
67bea95df5
commit
e09f306b6b
@ -15,7 +15,7 @@
|
|||||||
{{- $group_slug := $group.title | urlize -}}
|
{{- $group_slug := $group.title | urlize -}}
|
||||||
{{- $active_group := eq $.Page.Params.group $group_slug }}
|
{{- $active_group := eq $.Page.Params.group $group_slug }}
|
||||||
|
|
||||||
<li class="bd-sidenav-group my-1{{ if $active_group }} active{{ end }} js-sidenav-group">
|
<li class="bd-sidenav-group my-1{{ if $active_group }} active{{ end }} js-sidenav-group{{ if $group.pages }} has-children{{ end }}">
|
||||||
<a class="d-inline-flex align-items-center bd-sidenav-group-link" href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ if $group.pages }}{{ $link_slug }}/{{ end }}">
|
<a class="d-inline-flex align-items-center bd-sidenav-group-link" href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ if $group.pages }}{{ $link_slug }}/{{ end }}">
|
||||||
<div>{{- $group.title -}}</div>
|
<div>{{- $group.title -}}</div>
|
||||||
</a>
|
</a>
|
||||||
|
@ -43,7 +43,17 @@
|
|||||||
color: rgba(0, 0, 0, .65);
|
color: rgba(0, 0, 0, .65);
|
||||||
@include border-radius(.25rem);
|
@include border-radius(.25rem);
|
||||||
|
|
||||||
&::before {
|
> * { pointer-events: none; }
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: rgba(0, 0, 0, .85);
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: rgba($bd-purple-bright, .1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bd-sidenav-group {
|
||||||
|
&.has-children .bd-sidenav-group-link::before {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: .875rem;
|
width: .875rem;
|
||||||
height: .875rem;
|
height: .875rem;
|
||||||
@ -55,16 +65,6 @@
|
|||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
|
|
||||||
> * { pointer-events: none; }
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: rgba(0, 0, 0, .85);
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: rgba($bd-purple-bright, .1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bd-sidenav-group {
|
|
||||||
&.active {
|
&.active {
|
||||||
.bd-sidenav-group-link::before {
|
.bd-sidenav-group-link::before {
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
@ -80,11 +80,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide icon on last item
|
|
||||||
.bd-sidenav-group:last-child .bd-sidenav-group-link::before {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
// All levels of nav
|
// All levels of nav
|
||||||
.bd-sidebar .nav {
|
.bd-sidebar .nav {
|
||||||
padding-left: 1.25rem;
|
padding-left: 1.25rem;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user