Opened 6 years ago
Closed 2 years ago
#51933 closed defect (bug) (worksforme)
Twenty Twelve: Specificity issues with heading font sizes & the block editor
| Reported by: | mrfoxtalbot | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Bundled Theme | Version: | 5.6 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | css |
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
@
6 years ago
- Component Themes → Bundled Theme
- Summary Specificity issues with TwentyTwelve heading font sizes & the block editor → Twenty Twelve: Specificity issues with heading font sizes & the block editor
This ticket was mentioned in Slack in #core by lukecarbis. View the logs.
6 years ago
#6
@
2 years ago
- Keywords needs-patch removed
- Milestone Awaiting Review
- Resolution → worksforme
- Status new → closed
This still happened with WordPress 5.8, but 5.9 fixed the issue (involving at least [52049]).
- Added
!importantto 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I'm not getting the
42font-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 h2class.