#61571 closed defect (bug) (fixed)
Twenty Fifteen: Code block font family is different in iframe editor
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.7 | Priority: | normal |
| Severity: | minor | Version: | 6.4 |
| Component: | Bundled Theme | Keywords: | has-patch commit |
| Focuses: | css | Cc: |
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
@
20 months ago
- Focuses css added
- Keywords has-patch needs-testing added
- Milestone changed from Awaiting Review to Future Release
- Summary changed from Twenty Fifteen: Code block font family is different in back-end & Front-end. to Twenty Fifteen: Code block font family is different in iframe editor
- Version set to 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
@
19 months ago
- Milestone changed from Future Release to 6.7
- Owner set to karmatosed
- Status changed from new to 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.
frontend