Consolidate popup checked classes
This commit is contained in:
@@ -133,14 +133,6 @@
|
||||
}
|
||||
|
||||
.quick-filter {
|
||||
.checked {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[aria-checked="true"] .checked {
|
||||
display: block;
|
||||
}
|
||||
|
||||
&:has([aria-checked="true"]):not(.quick-filter--with-default) {
|
||||
.input--select {
|
||||
--input-background: var(--color-selected);
|
||||
|
||||
@@ -113,6 +113,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.checked {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&[aria-checked="true"] .checked {
|
||||
display: block;
|
||||
}
|
||||
|
||||
&[aria-selected] {
|
||||
background-color: var(--color-selected);
|
||||
|
||||
@@ -137,14 +145,6 @@
|
||||
max-inline-size: 100%;
|
||||
padding: var(--inline-space-half) var(--popup-item-padding-inline);
|
||||
text-align: start;
|
||||
|
||||
.icon.current {
|
||||
display: none;
|
||||
|
||||
.popup__item--current & {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup__icon {
|
||||
|
||||
@@ -17,11 +17,11 @@ module FiltersHelper
|
||||
|
||||
def filter_place_menu_item(path, label, icon, new_window: false, current: false)
|
||||
link_to_params = new_window ? { target: "_blank" } : {}
|
||||
tag.li class: [ "popup__item", { "popup__item--current": current } ], id: "filter-place-#{label.parameterize}", data: { filter_target: "item", navigable_list_target: "item" } do
|
||||
tag.li class: "popup__item", id: "filter-place-#{label.parameterize}", data: { filter_target: "item", navigable_list_target: "item" }, aria: { checked: current } do
|
||||
concat icon_tag(icon, class: "popup__icon")
|
||||
concat(link_to(path, link_to_params.merge(class: "popup__btn btn")) do
|
||||
concat tag.span(label, class: "overflow-ellipsis")
|
||||
concat icon_tag("check", class: "current flex-item-justify-end", "aria-hidden": true)
|
||||
concat icon_tag("check", class: "checked flex-item-justify-end", "aria-hidden": true)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user