diff --git a/packages/block-library/src/style.scss b/packages/block-library/src/style.scss index 19b1d3208d4e52..e68f0df87571df 100644 --- a/packages/block-library/src/style.scss +++ b/packages/block-library/src/style.scss @@ -216,30 +216,36 @@ // Font sizes. -:root { - .has-small-font-size { - font-size: 13px; - } - - .has-regular-font-size, // Not used now, kept because of backward compatibility. - .has-normal-font-size { - font-size: 16px; - } +// The reason we add the editor class wrapper here is +// to avoid enqueing the classes twice: here and in ./editor.scss +.editor-styles-wrapper .has-small-font-size, +.has-small-font-size { + font-size: 13px; +} - .has-medium-font-size { - font-size: 20px; - } +.editor-styles-wrapper .has-regular-font-size, +.editor-styles-wrapper .has-normal-font-size, +.has-regular-font-size, // Not used now, kept because of backward compatibility. +.has-normal-font-size { + font-size: 16px; +} - .has-large-font-size { - font-size: 36px; - } +.editor-styles-wrapper .has-medium-font-size, +.has-medium-font-size { + font-size: 20px; +} - .has-larger-font-size, // Not used now, kept because of backward compatibility. - .has-huge-font-size { - font-size: 42px; - } +.editor-styles-wrapper .has-large-font-size, +.has-large-font-size { + font-size: 36px; } +.editor-styles-wrapper .has-larger-font-size, +.editor-styles-wrapper .has-huge-font-size, +.has-larger-font-size, // Not used now, kept because of backward compatibility. +.has-huge-font-size { + font-size: 42px; +} // Text alignments. .has-text-align-center {