mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03:00
Add rudimentary nested dropdowns
This commit is contained in:
@@ -63,6 +63,25 @@
|
||||
left: 0;
|
||||
margin-top: var(--#{$variable-prefix}dropdown-spacer);
|
||||
}
|
||||
|
||||
.dropdown > .dropdown-item {
|
||||
background-image: escape-svg($dropdown-nested-bg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: $dropdown-nested-bg-position;
|
||||
background-size: $dropdown-nested-bg-size;
|
||||
|
||||
&:active {
|
||||
background-image: escape-svg($dropdown-nested-active-bg);
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown .dropdown-menu:hover,
|
||||
.dropdown > .dropdown-item:hover ~ .dropdown-menu {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: calc(100% - .25rem); // stylelint-disable-line function-disallowed-list
|
||||
display: block;
|
||||
|
||||
}
|
||||
|
||||
// scss-docs-start responsive-breakpoints
|
||||
|
||||
@@ -1149,6 +1149,11 @@ $dropdown-item-padding-x: $spacer !default;
|
||||
|
||||
$dropdown-header-color: $gray-600 !default;
|
||||
$dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x !default;
|
||||
|
||||
$dropdown-nested-bg: url("data:image/svg+xml,<svg viewBox='0 0 7 12' xmlns='http://www.w3.org/2000/svg'><path d='m1 1 5 5-5 5' stroke='#{$dropdown-link-color}' fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/></svg>") !default;
|
||||
$dropdown-nested-active-bg: url("data:image/svg+xml,<svg viewBox='0 0 7 12' xmlns='http://www.w3.org/2000/svg'><path d='m1 1 5 5-5 5' stroke='#{$dropdown-link-active-color}' fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/></svg>") !default;
|
||||
$dropdown-nested-bg-position: right $dropdown-item-padding-x center !default;
|
||||
$dropdown-nested-bg-size: 7px 12px !default;
|
||||
// scss-docs-end dropdown-variables
|
||||
|
||||
// scss-docs-start dropdown-dark-variables
|
||||
|
||||
Reference in New Issue
Block a user