Skip to content

Commit

Permalink
Do not use mixin for font-sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Dec 14, 2021
1 parent 3234772 commit 669f4f0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
10 changes: 0 additions & 10 deletions packages/base-styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -538,13 +538,3 @@
}
/* stylelint-enable function-comma-space-after */
}

// Deprecated from UI, kept for back-compatibility
@mixin font-sizes-deprecated() {
.has-normal-font-size {
font-size: var(--wp--preset--font-size--normal);
}
.has-huge-font-size {
font-size: var(--wp--preset--font-size--huge);
}
}
9 changes: 8 additions & 1 deletion packages/block-library/src/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
@include gradient-colors-deprecated();
--wp--preset--font-size--normal: 16px;
--wp--preset--font-size--huge: 42px;
@include font-sizes-deprecated();
}

// Font sizes (not used now, kept because of backward compatibility).
Expand All @@ -20,6 +19,14 @@
font-size: 2.625em;
}

.has-normal-font-size {
font-size: var(--wp--preset--font-size--normal);
}

.has-huge-font-size {
font-size: var(--wp--preset--font-size--huge);
}

// Text alignments.
.has-text-align-center {
text-align: center;
Expand Down
9 changes: 8 additions & 1 deletion packages/block-library/src/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
@include gradient-colors-deprecated();
--wp--preset--font-size--normal: 16px;
--wp--preset--font-size--huge: 42px;
@include font-sizes-deprecated();
}

// Font sizes (not used now, kept because of backward compatibility).
Expand All @@ -67,6 +66,14 @@
font-size: 42px;
}

.editor-styles-wrapper .has-normal-font-size {
font-size: var(--wp--preset--font-size--normal);
}

.editor-styles-wrapper .has-huge-font-size {
font-size: var(--wp--preset--font-size--huge);
}

/**
* Editor Normalization Styles
*
Expand Down

0 comments on commit 669f4f0

Please sign in to comment.