Opened 5 years ago
Closed 4 years ago
#50271 closed defect (bug) (fixed)
Twenty Twenty uses overly specific selector for button background
Reported by: | flixos90 | Owned by: | ianbelanger |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | css | Cc: |
Description
Twenty Twenty uses a button:not(.toggle)
selector to set the Customizer-chosen background-color for buttons in general. This can cause problems with plugins that include their own buttons in the frontend and have specific classes for them (e.g. cookie banner plugins), because the :not(.toggle)
part makes the selector too specific, overriding any class-selectors applying to buttons, even if provided as button.{className}
.
Since Twenty Twenty already includes a button.toggle
rule that sets background: none
, there really is no need for the button:not(.toggle)
selector usage anyway. Since it introduces the above specificity problems, it would be better to simplify this selector to just button
.
Attachments (1)
Change History (8)
#3
@
5 years ago
- Keywords commit added
- Owner set to ianbelanger
- Status changed from new to reviewing
#5
@
5 years ago
- Keywords fixed-major added; commit removed
- Milestone changed from 5.5 to 5.4.3
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for backport.
50271.diff resolves the issue by changing
button:not(.toggle)
tobutton
.