Add block editor styling

This commit is contained in:
Robin Cornett
2019-06-24 09:53:15 -04:00
parent 1aa3728e0d
commit 97e3f84a12
3 changed files with 15 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
div[class^="wp-block-displayfeaturedimagegenesis"]:before{position:absolute;top:0;right:0;bottom:0;left:0;content:' ';background-color:rgba(255,255,255,0)}
@@ -39,6 +39,7 @@ class DisplayFeaturedImageGenesisOutputBlock {
"{$this->name}{$block}",
array(
'editor_script' => "{$this->block}block",
'editor_style' => "{$this->block}block",
'attributes' => $this->fields( $block ),
'render_callback' => array( $this, "render_{$data['nickname']}" ),
)
@@ -133,6 +134,7 @@ class DisplayFeaturedImageGenesisOutputBlock {
public function register_script_style() {
$minify = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : ' . min';
$version = displayfeaturedimagegenesis_get()->version;
wp_register_style( "{$this->block}block", plugin_dir_url( dirname( __FILE__ ) ) . 'css/blocks.css', array(), $version, 'screen' );
if ( ! $minify ) {
$version .= current_time( 'gmt' );
}
+12
View File
@@ -0,0 +1,12 @@
div[class^="wp-block-displayfeaturedimagegenesis"] {
&:before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: ' ';
background-color: rgba(255, 255, 255, 0);
}
}