Преглед изворни кода

Other: Revert CSS variables usage from font size feature content styles.

Maciej Gołaszewski пре 7 година
родитељ
комит
028d50bcc2
2 измењених фајлова са 11 додато и 29 уклоњено
  1. 0 16
      packages/ckeditor5-font/docs/features/font.md
  2. 11 13
      packages/ckeditor5-font/theme/fontsize.css

+ 0 - 16
packages/ckeditor5-font/docs/features/font.md

@@ -85,22 +85,6 @@ Here's an example of the font size CSS classes:
 }
 }
 ```
 ```
 
 
-#### Using CSS Variables
-
-The font size feature is using the power of [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) which are defined in the [stylesheet](https://github.com/ckeditor/ckeditor5-font/blob/master/theme/fontsize.css). Thanks to that, both the UI and the content styles share the same font-size definitions, which can be easily customized:
-
-```css
-:root {
-	/* Make big text a bit bigger */
-	--ck-fontsize-big: 1.6em;
-	
-	/* Make huge text really huge. */
-	--ck-fontsize-huge: 3em;
-}
-```
-
-#### Example configuration
-
 An example of the editor that supports only two font sizes:
 An example of the editor that supports only two font sizes:
 
 
 ```js
 ```js

+ 11 - 13
packages/ckeditor5-font/theme/fontsize.css

@@ -3,20 +3,18 @@
  * For licensing, see LICENSE.md.
  * For licensing, see LICENSE.md.
  */
  */
 
 
-:root {
-	--ck-fontsize-tiny: .7em;
-	--ck-fontsize-small: .85em;
-	--ck-fontsize-big: 1.4em;
-	--ck-fontsize-huge: 1.8em;
+.text-tiny {
+	font-size: .7em;
 }
 }
 
 
-@define-mixin fontsize-preset $size {
-	.text-$size {
-		font-size: var(--ck-fontsize-$size);
-	}
+.text-small {
+	font-size: .85em;
 }
 }
 
 
-@mixin fontsize-preset tiny;
-@mixin fontsize-preset small;
-@mixin fontsize-preset big;
-@mixin fontsize-preset huge;
+.text-big {
+	font-size: 1.4em;
+}
+
+.text-huge {
+	font-size: 1.8em;
+}