Opened 4 years ago
Closed 13 months ago
#51933 closed defect (bug) (worksforme)
Twenty Twelve: Specificity issues with heading font sizes & the block editor
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.6 |
Component: | Bundled Theme | Keywords: | |
Focuses: | css | Cc: |
Description
TwentyTwelve font sizes on headings only work if you add a specific number. Adding the "preset" sizes does not work due to the theme's styles being too specific:
.entry-content h2 {font-size: 18px;}
This seems to prevent the less specific heading font sizes styles (which only use one class) from working.
.has-huge-font-size { font-size: 42; }
I have also noticed an error in the inspector, I am not sure why the "42" there has does not specify px, rem or something.
Attachments (4)
Change History (10)
#1
@
4 years ago
- Component changed from Themes to Bundled Theme
- Summary changed from Specificity issues with TwentyTwelve heading font sizes & the block editor to Twenty Twelve: Specificity issues with heading font sizes & the block editor
This ticket was mentioned in Slack in #core by lukecarbis. View the logs.
4 years ago
#6
@
13 months ago
- Keywords needs-patch removed
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
This still happened with WordPress 5.8, but 5.9 fixed the issue (involving at least [52049]).
- Added
!important
to the size classes' value, so that overrides the specificity difference - Replaced "Huge" font size with "Extra Large" (XL)
Note: See
TracTickets for help on using
tickets.
I'm not getting the
42
font-size issue, but I can confirm that Heading blocks in Twenty Twelve don't respect the Typography > Font Size setting on the frontend (though they do in the editor). It seems like it is indeed overridden by the.entry-content h2
class.