Last active
February 20, 2019 18:28
-
-
Save eclarrrk/71ab14be54853ffba39cc7d7642b987d to your computer and use it in GitHub Desktop.
Wide and Full-width Gutenberg block options
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
<?php | |
// Register support for Gutenberg wide images in your theme | |
function mytheme_setup() { | |
add_theme_support( 'align-wide' ); | |
} | |
add_action( 'after_setup_theme', 'mytheme_setup' ); |
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
/* This is a starting point. Customize for your theme */ | |
.entry-content .alignwide { | |
margin-left : -80px; | |
margin-right : -80px; | |
} | |
.entry-content .alignfull { | |
margin-left : calc( -100vw / 2 + 100% / 2 ); | |
margin-right : calc( -100vw / 2 + 100% / 2 ); | |
max-width : 100vw; | |
} | |
.alignfull img { | |
width: 100vw; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment