#61571 closed defect (bug) (fixed)
Twenty Fifteen: Code block font family is different in iframe editor
| Reported by: | pranitdugad | Owned by: | karmatosed |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.7 |
| Component: | Bundled Theme | Version: | 6.4 |
| Severity: | minor | Keywords: | has-patch commit |
| Cc: | Focuses: | css |
Description
Hello,
I have reviewed "Code" block and found that its font-family is different in both(Editor & Front-end) sides.
I think that it should be same on both sides.
Thanks,
Attachments (4)
Change History (10)
#1
@
2 years ago
- Focuses css added
- Keywords has-patch needs-testing added
- Milestone Awaiting Review → Future Release
- Summary Twenty Fifteen: Code block font family is different in back-end & Front-end. → Twenty Fifteen: Code block font family is different in iframe editor
- Version → 6.4
In the iframe-based editor, WordPress 6.4 stopped adding .editor-styles-wrapper to selectors it pulled from the theme's editor-style.css. Then Twenty Fifteen's Inconsolata font in code element styles did not override .wp-block-code code {font-family: inherit} from block-library/style.css, which inherited .wp-block-code {font-family: Menlo,Consolas,monaco,monospace} from block-library/theme.css.
61571.1.patch adds Inconsolata to the Code block (not the code element) within block editor styles. The font could be added to the existing ruleset instead, but I chose to target .wp-block-code without raising the specificity.
Note: Twenty Sixteen would need a similar change in its editor-blocks.css (other themes should not need a change).
#2
@
2 years ago
- Milestone Future Release → 6.7
- Owner set to
- Status new → assigned
Assigning this to myself to test with a view to commit.
@sabernhardt we don't seem to have an issue unless I am mistaken for this:
Note: Twenty Sixteen would need a similar change in its editor-blocks.css (other themes should not need a change).
Do you want to create one and also that patch? Happy to resolve both if we are doing that.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
frontend