Skip to content

Commit

Permalink
fix(editor): Fix heading tag indicators (#1)
Browse files Browse the repository at this point in the history
chore(editor): Nest editor styles inside of `.editor-wrapper-styles`
chore(deps): Set `purge` to `false` in tailwind config
  • Loading branch information
Log1x authored Nov 8, 2022
1 parent 77b64c5 commit bda3f2b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion public/css/blocks.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/css/editor.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions resources/css/blocks.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
@import './blocks/core-list';
@import './blocks/core-classic';
.editor-styles-wrapper {
@import './blocks/core-list';
@import './blocks/core-classic';
}
6 changes: 3 additions & 3 deletions resources/css/blocks/core-heading.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.wp-block[data-type='core/heading'] {
@apply relative;

&:not(.is-selected)::after {
@apply font-sans absolute mt-2 -ml-8 font-medium text-xs opacity-50 tracking-tight uppercase;
&:not(.is-selected)::before {
@apply font-sans absolute mt-3 -ml-8 font-medium text-xs opacity-50 tracking-tight uppercase;

content: '';
}
}

@each $heading in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6') {
#{$heading}.wp-block[data-type='core/heading']:not(.is-selected)::after {
#{$heading}.wp-block[data-type='core/heading']:not(.is-selected)::before {
content: '#{$heading}';
}
}
4 changes: 3 additions & 1 deletion resources/css/editor.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@import './blocks/core-heading';
.editor-styles-wrapper {
@import './blocks/core-heading';
}

table.wpil-outbound-links {
@apply relative #{!important};
Expand Down
8 changes: 1 addition & 7 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
module.exports = {
future: {
removeDeprecatedGapUtilities: true,
purgeLayersByDefault: true,
defaultLineHeights: true,
standardFontWeights: true,
},
purge: [],
purge: false,
theme: {
extend: {
fontFamily: {
Expand Down

0 comments on commit bda3f2b

Please sign in to comment.