Last active
July 3, 2023 11:12
-
-
Save iansvo/3379fc212abd622561097f4b244337aa to your computer and use it in GitHub Desktop.
CSS Snippet to calculate the real available width of the WordPress block editor
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
.edit-post-layout:has(.interface-interface-skeleton__secondary-sidebar) { | |
--overview-width: 350px; | |
} | |
.edit-post-layout.is-sidebar-opened { | |
--settings-width: 280px; | |
} | |
.edit-post-layout { | |
--scrollbar-width: 16px; | |
--canvas-width: calc(100vw - var(--overview-width, 0px) - var(--settings-width, 0px) - var(--scrollbar-width)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment