Fix admin menu icon box: robust CSS selectors to hide pseudo-icon for vendorsalesreport menu

This commit is contained in:
shopkeeperdev
2025-11-04 17:03:56 -05:00
parent 9afacc7fe1
commit 18fe99e1c3

View File

@@ -1,11 +1,17 @@
/* Vendor Sales Report Menu - Remove icon */ /* Vendor Sales Report Menu - Hide icon/pseudo-element reliably
.item-vendorsalesreport > a:before { Some Magento admin menu item class names vary depending on how the
display: none !important; menu id is normalized (module and item id). Targetting the generated
} class used by this module may not always match, which causes a
leftover glyph/box to appear. Use the menu link href as a reliable
selector and include broader admin menu selectors so the icon is
removed even if the class name differs. */
/* Additional targeting for stubborn icons */ /* Target by href that contains the admin route for this module */
#menu-magento-reports-report .item-vendorsalesreport > a:before, #menu a[href*="vendorsalesreport/report/index"]::before,
.admin__menu .item-vendorsalesreport > a:before { .admin__menu a[href*="vendorsalesreport/report/index"]::before,
/* Fallback: any menu item with vendorsalesreport in its class name */
.admin__menu [class*="vendorsalesreport"] > a::before,
.admin__menu [class*="vendorsalesreport"] > a:before {
content: none !important; content: none !important;
display: none !important; display: none !important;
width: 0 !important; width: 0 !important;
@@ -13,3 +19,6 @@
margin: 0 !important; margin: 0 !important;
padding: 0 !important; padding: 0 !important;
} }
/* Historic selector kept for backward compatibility */
.item-vendorsalesreport > a:before { display: none !important; }