From 2181f044c49c407ecbe5d43fda4c516e63bc5dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Wed, 29 Apr 2020 13:14:41 +0200 Subject: [PATCH 1/2] Remove root pseudoclass --- packages/block-library/src/style.scss | 35 ++++++++++++--------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/packages/block-library/src/style.scss b/packages/block-library/src/style.scss index 19b1d3208d4e5..1833c1f368e14 100644 --- a/packages/block-library/src/style.scss +++ b/packages/block-library/src/style.scss @@ -216,30 +216,27 @@ // 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; - } +.has-small-font-size { + font-size: 13px; +} - .has-medium-font-size { - font-size: 20px; - } +.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; - } +.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; - } +.has-large-font-size { + font-size: 36px; } +.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 { From 163143a00418a163c38db14fe0e6129b78bea0a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Thu, 30 Apr 2020 12:41:42 +0200 Subject: [PATCH 2/2] Wrap the font-sizes for the editor --- packages/block-library/src/style.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/block-library/src/style.scss b/packages/block-library/src/style.scss index 1833c1f368e14..e68f0df87571d 100644 --- a/packages/block-library/src/style.scss +++ b/packages/block-library/src/style.scss @@ -216,23 +216,32 @@ // Font sizes. +// 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; } +.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; } +.editor-styles-wrapper .has-medium-font-size, .has-medium-font-size { font-size: 20px; } +.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;