Last active
August 18, 2021 11:27
-
-
Save cbirdsong/a3c798d04f0a67acbd0c6f0bd39d72ff to your computer and use it in GitHub Desktop.
Block editor styling strategy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.block-accordion { | |
// Generic styles | |
@if ($is-editor == true) { | |
// Styles you need for editing, like opening this accordion so you can access the content | |
} | |
@if ($is-editor == false) { | |
// Or maybe some other styles that disagree with the editor for whatever reason | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$is-editor: false !default; | |
// Other variables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$is-editor: true; | |
@import "main"; | |
// Usually add other editor-specific styles here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "variables"; | |
@import "mixins"; | |
@import "base"; | |
@import "blocks"; | |
@import "etc"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment