Skip to content

Instantly share code, notes, and snippets.

@samikeijonen
Created March 17, 2018 07:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samikeijonen/b78912d9e29e632d4f1c14da043f5ed9 to your computer and use it in GitHub Desktop.
Save samikeijonen/b78912d9e29e632d4f1c14da043f5ed9 to your computer and use it in GitHub Desktop.
Align full and wide CSS example for WP editor
// Align full and wide.
.alignfull {
margin-left: calc(50% - 50vw);
margin-right: calc(50% - 50vw);
max-width: 1000%;
width: auto;
}
@media (min-width: $breakpoint-1) {
.alignwide {
margin-left: calc(25% - 25vw);
margin-right: calc(25% - 25vw);
&.wp-block-gallery {
margin-left: calc(25% - 25vw - #{ $global-spacing-unit-1 });
margin-right: calc(25% - 25vw - #{ $global-spacing-unit-1 });
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment