Skip to content

Instantly share code, notes, and snippets.

@cbirdsong
Last active August 18, 2021 11:27
Show Gist options
  • Save cbirdsong/a3c798d04f0a67acbd0c6f0bd39d72ff to your computer and use it in GitHub Desktop.
Save cbirdsong/a3c798d04f0a67acbd0c6f0bd39d72ff to your computer and use it in GitHub Desktop.
Block editor styling strategy
.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
}
}
$is-editor: false !default;
// Other variables
$is-editor: true;
@import "main";
// Usually add other editor-specific styles here
@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