mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
Fix mobile menu jump & double border
This commit is contained in:
parent
61b5efbaf7
commit
5d310db486
@ -5,39 +5,41 @@
|
|||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<nav class="collapse bd-links" id="bd-docs-nav" aria-label="Main navigation">
|
<div class="collapse d-md-block row" id="bd-docs-nav">
|
||||||
{%- assign page_slug = page.url | split: '/' | last -%}
|
<nav class="bd-links" aria-label="Main navigation">
|
||||||
{%- for group in site.data.nav -%}
|
{%- assign page_slug = page.url | split: '/' | last -%}
|
||||||
{%- assign link = group.pages | first -%}
|
{%- for group in site.data.nav -%}
|
||||||
{%- assign link_slug = link.title | slugify -%}
|
{%- assign link = group.pages | first -%}
|
||||||
{%- assign group_slug = group.title | slugify -%}
|
{%- assign link_slug = link.title | slugify -%}
|
||||||
{%- assign active = nil -%}
|
{%- assign group_slug = group.title | slugify -%}
|
||||||
|
{%- assign active = nil -%}
|
||||||
|
|
||||||
{%- if page.group == group_slug -%}
|
{%- if page.group == group_slug -%}
|
||||||
{%- assign active = 'active' -%}
|
{%- assign active = 'active' -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
<div class="bd-toc-item{% unless active == nil %} {{ active }}{% endunless %}">
|
<div class="bd-toc-item{% unless active == nil %} {{ active }}{% endunless %}">
|
||||||
<a class="bd-toc-link" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/{{ group_slug }}/{{ link_slug }}{% if link_slug %}/{% endif %}">
|
<a class="bd-toc-link" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/{{ group_slug }}/{{ link_slug }}{% if link_slug %}/{% endif %}">
|
||||||
{{ group.title }}
|
{{ group.title }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<ul class="nav bd-sidenav">
|
<ul class="nav bd-sidenav">
|
||||||
{%- for doc in group.pages -%}
|
{%- for doc in group.pages -%}
|
||||||
{%- assign doc_slug = doc.title | slugify -%}
|
{%- assign doc_slug = doc.title | slugify -%}
|
||||||
{%- assign active = nil -%}
|
{%- assign active = nil -%}
|
||||||
|
|
||||||
{%- if page.group == group_slug and page_slug == doc_slug -%}
|
{%- if page.group == group_slug and page_slug == doc_slug -%}
|
||||||
{%- assign active = 'active bd-sidenav-active' -%}
|
{%- assign active = 'active bd-sidenav-active' -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
<li{% unless active == nil %} class="{{ active }}"{% endunless %}>
|
<li{% unless active == nil %} class="{{ active }}"{% endunless %}>
|
||||||
<a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/{{ group_slug }}/{{ doc_slug }}/">
|
<a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/{{ group_slug }}/{{ doc_slug }}/">
|
||||||
{{ doc.title }}
|
{{ doc.title }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</nav>
|
</nav>
|
||||||
|
</div>
|
||||||
|
@ -66,10 +66,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bd-links {
|
.bd-links {
|
||||||
|
width: 100%;
|
||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
padding-bottom: 1rem;
|
padding-bottom: 1rem;
|
||||||
margin-right: -15px;
|
border-top: 1px solid rgba(0, 0, 0, .05);
|
||||||
margin-left: -15px;
|
|
||||||
|
|
||||||
@include media-breakpoint-up(md) {
|
@include media-breakpoint-up(md) {
|
||||||
@supports (position: sticky) {
|
@supports (position: sticky) {
|
||||||
@ -77,11 +77,6 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override collapse behaviors
|
|
||||||
@include media-breakpoint-up(md) {
|
|
||||||
display: block !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.bd-search {
|
.bd-search {
|
||||||
@ -89,7 +84,6 @@
|
|||||||
padding: 1rem 15px;
|
padding: 1rem 15px;
|
||||||
margin-right: -15px;
|
margin-right: -15px;
|
||||||
margin-left: -15px;
|
margin-left: -15px;
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, .05);
|
|
||||||
|
|
||||||
.form-control:focus {
|
.form-control:focus {
|
||||||
border-color: $bd-purple-bright;
|
border-color: $bd-purple-bright;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user