Skip to content

Commit

Permalink
font-size presets: fix specificity in editor (#21969)
Browse files Browse the repository at this point in the history
  • Loading branch information
nosolosw authored May 6, 2020
1 parent 0ad9fcd commit 7da5571
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions packages/block-library/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -237,30 +237,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 {
Expand Down

0 comments on commit 7da5571

Please sign in to comment.