![editix font size editix font size](http://i.stack.imgur.com/lrAYA.png)
However, when you define a font size for the block editor to use, the size parameter must be a number, set as an integer, or else you’ll end up with inline styles added to your content instead of classes, because WordPress can only match font sizes with integers (I’ve found this one out the hard way). This is actually the case with Twenty Twenty as well, if you want to look at the style.css. Some theme authors prefer to set up font size rules using units other than pixels, such as ems or rems (I’ve also seen %). Instead of having a “reserved” size/slug which should not be used, here, we have a slug which should be defined. This is kind of an opposite situation from the one I described last week with defining custom editor colors. If you look at the Block Editor Handbook, the default font sizes provided by WordPress do include a Normal size, although the CSS example provided is for a “regular” size, which I believe was the original default in Gutenberg. This is the case even if a “normal” font size is defined, because the block is initially set to have no font size defined, regardless of what the select input shows. If a user wants that block’s font size to be Small, they have to select a different size, and then change the selection to Small. Twenty Twenty’s custom defined font sizes are currently Small (first, which is why it’s showing here), Regular, Large, and Larger (here’s where Twenty Twenty defines its font sizes, if you want to look). This is confusing, I think, as it suggests that the active block’s font size is Small, when there is actually no font size set for this block at all. I haven’t set a font size for this block. For example, the Twenty Twenty theme, which is still in development, does not currently define a “normal” font size, so with that theme active, here’s what an unedited paragraph looks like in the editor: If your theme defines a “normal” font size, then you won’t see anything you don’t expect, but if not, you’ll see some unexpected behavior. As of Gutenberg version 6.7 (the most recent version at the time I’m writing this), if a font size is not set at all for a block, the font size selector will display one of two options: 1) Normal, if a “normal” font size has been defined or 2) whatever the first defined font size is.Īt this point in time, from what I can tell, the block editor defines the default, or fallback font size, as “normal”. The first thing to know is that when you select a block which allows you to change the font size, the block editor does not include a blank, or empty option. So defining custom font sizes, and having the correct class be automatically applied, is pretty magical.Īs I’ve been working with the font size options specifically, I’ve run into some unwritten rules and potential shortcomings, which can be worked around if you know they exist. Miss Bingley immediately fixed her eyes on his face, and desired he would tell her what lady had the credit of inspiring such reflections.Īt this point, if I want to change that font size, I have to do it every place I’ve used it. I have been meditating on the very great pleasure which a pair of fine eyes in the face of a pretty woman can bestow.”īecause it uses a CSS class ( has-large-font-size), I can change that specific rule in my stylesheet, and wherever that class is used, the new style is applied. “Your conjecture is totally wrong, I assure you. It’s possible to do this by hand, too, using an inline style, but that’s a much less flexible approach. Defining these gives users specific options for adjusting their output, while staying within parameters set for the site.īasically, what this means is that a theme author can define a set of custom CSS classes which set a font size.
![editix font size editix font size](http://www.softis.co.kr/Content/Images/pimg/FONTRIX_GULIMFONT_IMG.jpg)
![editix font size editix font size](https://docs.flaxengine.com/manual/editor/advanced/media/editor-custom-font.png)
The new block editor in WordPress allows themes to define some specific rules for users, specifically colors and font sizes.