-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preformatted block: Add support for font sizes (#27584)
* Add preformatted block styles and font settings. * Add font size fallback. * Remove unnecessary overflow property and use `pre-wrap` instead. This is a more elegant solution compared to the previous one, which relied on overflow. * Remove editor.scss * Remove CSS custom property. This is the theme's job. For more information, see #27672 * Add stylesheet to `block.json` file This is added due to new requirement implemented in #25220 Co-authored-by: Ari Stathopoulos <aristath@gmail.com> * Add preformatted block to theme-json.md specs. * Fix preformatted block support information on theme-json.md specs. Co-authored-by: Ari Stathopoulos <aristath@gmail.com>
- Loading branch information
1 parent
c4ba256
commit cbbc353
Showing
4 changed files
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ | |
} | ||
}, | ||
"supports": { | ||
"anchor": true | ||
} | ||
"anchor": true, | ||
"fontSize": true | ||
}, | ||
"style": "wp-block-preformatted" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.wp-block-preformatted { | ||
white-space: pre-wrap; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters