Skip to content

Instantly share code, notes, and snippets.

@richtabor
Last active June 8, 2018 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richtabor/090e3eaf78322202630ae988a48dbf35 to your computer and use it in GitHub Desktop.
Save richtabor/090e3eaf78322202630ae988a48dbf35 to your computer and use it in GitHub Desktop.
.entry-content > *.alignwide {
max-width: 1024px;
}
.entry-content > *:not( .alignwide ):not( .alignfull ) {
margin-left: auto;
margin-right: auto;
max-width: 740px;
padding-left: 20px;
padding-right: 20px;
}
.alignleft img {
float: left;
}
.alignright img {
float: right;
}
<?php
/**
* Registers support for Gutenberg wide images in Writy.
*/
function writy_setup() {
add_theme_support( 'align-wide' );
}
add_action( 'after_setup_theme', 'writy_setup' );
.entry-content .alignfull {
margin-left : calc( -100vw / 2 + 100% / 2 );
margin-right : calc( -100vw / 2 + 100% / 2 );
max-width : 100vw;
}
.entry-content .alignwide {
margin-left : -100px;
margin-right : -100px;
max-width : 1024px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment