-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block Support: Fix font size style when applying block support #26762
Merged
jorgefilipecosta
merged 1 commit into
WordPress:master
from
aaronrobertshaw:fix/custom-font-sizes
Nov 9, 2020
Merged
Block Support: Fix font size style when applying block support #26762
jorgefilipecosta
merged 1 commit into
WordPress:master
from
aaronrobertshaw:fix/custom-font-sizes
Nov 9, 2020
Conversation
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
aaronrobertshaw
requested review from
spacedmonkey and
TimothyBJacobs
as code owners
November 6, 2020 08:36
jorgefilipecosta
approved these changes
Nov 9, 2020
@@ -76,7 +76,7 @@ function gutenberg_apply_typography_support( $block_type, $block_attributes ) { | |||
if ( $has_named_font_size ) { | |||
$classes[] = sprintf( 'has-%s-font-size', $block_attributes['fontSize'] ); | |||
} elseif ( $has_custom_font_size ) { | |||
$styles[] = sprintf( 'font-size: %spx;', $block_attributes['style']['typography']['fontSize'] ); | |||
$styles[] = sprintf( 'font-size: %s;', $block_attributes['style']['typography']['fontSize'] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch @aaronrobertshaw 👍
I guess this needs backporting to Core? |
youknowriad
added
the
Backport to WP 6.7 Beta/RC
Pull request that needs to be backported to the WordPress major release that's currently in beta
label
Nov 18, 2020
tellthemachines
pushed a commit
that referenced
this pull request
Nov 30, 2020
Merged
6 tasks
tellthemachines
added a commit
that referenced
this pull request
Dec 1, 2020
* Provide a minimum of code wrapping for the code block. (#26623) * Block Support: Fix font size style when applying block support (#26762) * Fix Separator editor styles (#27071) * Fix the Post author selector for contributors (#26554) Co-authored-by: Riad Benguella <benguella@gmail.com> * Align single half width column to left (#27142) * remove the auto margin for individual column blocks * update margin values for blocks in blocks to zero insted of auto * Add backward compatibility support for lightBlockWrapper in getSaveElement (#27189) * Code block: paste plain text (#27236) * paste plain text option * Add e2e test * Fix crash when null date passed to TimePicker (#27316) * Fix crash when null date passed. * Update test * Fix GH actions "cancel" step (#27025) * use new syntax for setting env var * Update package-lock * Update package-lock again * Remove the button only option from the UI until it can be wired up to something that works in the front end. (#27379) * Fix combobox csuggestion list closure when clicking scrollbar (#27367) Co-authored-by: Joen A <1204802+jasmussen@users.noreply.github.com> Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Co-authored-by: Nik Tsekouras <ntsekouras@outlook.com> Co-authored-by: Adam Silverstein <adamsilverstein@earthboundhosting.com> Co-authored-by: Riad Benguella <benguella@gmail.com> Co-authored-by: andrei draganescu <me@andreidraganescu.info> Co-authored-by: Daniel Richards <daniel.richards@automattic.com> Co-authored-by: Ella van Durpe <wp@iseulde.com> Co-authored-by: Noah Allen <noahtallen@gmail.com> Co-authored-by: Andy Peatling <apeatling@users.noreply.github.com>
tellthemachines
removed
the
Backport to WP 6.7 Beta/RC
Pull request that needs to be backported to the WordPress major release that's currently in beta
label
Dec 1, 2020
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes the font size block support style when applied server side. Previously, the generated style contained
pxpx
making it invalid CSS.How has this been tested?
Manually.
Testing Instructions
Screenshots
Types of changes
Bug Fix
Checklist: