Skip to content

Commit

Permalink
Fix float inside post editor
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjoling committed May 2, 2024
1 parent e012a23 commit 4853f81
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions assets/css/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,27 @@ experience.
The goal is to keep this file to a minimum.
*/


/* ------------------------ CHANGE DEFAULT BEHAVIOR ------------------------- */

/* Remove global padding from site container */
.editor-styles-wrapper {
padding: 0 !important;
}

/* Left and right alignments (float inside content) */
.is-root-container > .alignleft {
margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
}

.is-root-container > .alignright {
margin-right: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
}


/* -------------------------------- CUSTOM ---------------------------------- */

.image-button-2 > .wp-block-image > .components-resizable-box__container {
aspect-ratio: 21/9 !important;
}

4 changes: 2 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ h6.has-background {
*/

.entry-content > .alignleft {
margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
}

.entry-content > .alignright {
margin-right: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
margin-right: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
}

/* -------------------------------- CONTEXT -------------------------------- */
Expand Down

0 comments on commit 4853f81

Please sign in to comment.