You've already forked system.css
mirror of
https://github.com/sakofchit/system.css.git
synced 2026-05-05 06:01:22 +09:00
feat(style.css): enhance single children menu bar items
This commit targets items that act as single children items within a menu bar list, and enhances the styling so that they look and behave as items with a menu dropdown associated with them. It checks for the "aria-haspopup" attribute set to false and applies the styles. As I read the code, I found that some CSS rules clash with other rules if I use color variables for states like hover and focus, or if I try to look for a common styles ruleset and I add a selector for it. I believe what I added is not a good practice and does not follow a pattern because the code base became complicated to debug. In this case, I decided to inherit some styles and apply them to my selectors as I think it's a safe approach. Fixes #26
This commit is contained in:
@@ -637,6 +637,11 @@ ul[role="menu-bar"] > [role="menu-item"]:focus, ul[role="menu-bar"] > [role="men
|
||||
color: var(--primary);
|
||||
outline: none;
|
||||
}
|
||||
ul[role="menu-bar"] > [role="menu-item"][aria-haspopup="false"] * {
|
||||
color: inherit;
|
||||
background: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
ul[role="menu"] {
|
||||
position: relative;
|
||||
min-width: 200px;
|
||||
|
||||
Reference in New Issue
Block a user