[FIX] web: correctly target 'o_dropdown_item' child
Partially revert 47acba560a removing rules defining '<a>' children as
exceptions. Having an element (either <a> or a <span>) wrapping the
entry content is indeed now considered the norm.
This commit will extend bootstrap 'dropdown-item' design to any
'o_dropdown_item' first-child rather than on element itself.
task-2579123
This commit is contained in:
committed by
Aaron Bohy
parent
4e40979099
commit
a2ee6b923c
@@ -25,23 +25,6 @@
|
||||
&.selected { // Legacy
|
||||
@extend .dropdown-item.active;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.dropdown-menu .dropdown-item {
|
||||
// Using <a> tags inside a '.dropdown-item' elements should not be necessary
|
||||
// since the class in usually applied to the <a> tag itself.
|
||||
// The following rules will handle custom layouts needs (eg '.o_user_menu').
|
||||
&:not(.disabled):not(:disabled) a:not(.disabled):not(:disabled) {
|
||||
@include o-hover-text-color($dropdown-link-color, $dropdown-link-hover-color);
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
&.disabled a, &:disabled a {
|
||||
@include o-hover-text-color(
|
||||
$dropdown-link-disabled-color,
|
||||
$dropdown-link-disabled-color);
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-header {
|
||||
@@ -78,21 +61,17 @@
|
||||
&.o_dropdown_menu_right {
|
||||
@extend .dropdown-menu-right;
|
||||
}
|
||||
}
|
||||
|
||||
&_item {
|
||||
@extend .dropdown-item;
|
||||
|
||||
// we want the dropdownitem first child to define its own padding
|
||||
// because it can be an <a href/>
|
||||
padding: 0;
|
||||
> *:first-child {
|
||||
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
&.o_dropdown_active {
|
||||
@extend .dropdown-item:hover;
|
||||
// Since wrapping entry's content is the norm, @extend bootstrap
|
||||
// '.dropdown-item' classes to the inner element (eg. <a> or <span>)
|
||||
// rather that on 'o_dropdown_item'.
|
||||
.o_dropdown_item {
|
||||
> :first-child {
|
||||
@extend .dropdown-item;
|
||||
}
|
||||
&.selected > :first-child {
|
||||
@extend .active;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
|
||||
.o_dropdown_menu_group_entry {
|
||||
.o_dropdown_menu_group_entry.o_dropdown_item {
|
||||
> *:first-child {
|
||||
padding-left: $o-dropdown-hpadding * 1.5;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user