From 9365a74cfd0bbcca48226feacef5d04da5d4ab89 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Wed, 5 Apr 2017 19:19:26 -0400 Subject: [PATCH] Remove focus outline from editable block Focus appearance managed by editor block renderer --- blocks/components/editable/index.js | 5 +++++ blocks/components/editable/style.scss | 3 +++ index.php | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 blocks/components/editable/style.scss diff --git a/blocks/components/editable/index.js b/blocks/components/editable/index.js index c674f75a524946..7ae87e74d5087a 100644 --- a/blocks/components/editable/index.js +++ b/blocks/components/editable/index.js @@ -1,3 +1,8 @@ +/** + * Internal dependencies + */ +import './style.scss'; + export default class Editable extends wp.element.Component { constructor() { super( ...arguments ); diff --git a/blocks/components/editable/style.scss b/blocks/components/editable/style.scss new file mode 100644 index 00000000000000..1a143b68d8ea17 --- /dev/null +++ b/blocks/components/editable/style.scss @@ -0,0 +1,3 @@ +.blocks-editable:focus { + outline: none; +} diff --git a/index.php b/index.php index 1df607a008a892..829525655b7bcc 100644 --- a/index.php +++ b/index.php @@ -43,6 +43,7 @@ function gutenberg_register_scripts() { wp_register_script( 'wp-i18n', plugins_url( 'i18n/build/index.js', __FILE__ ) ); wp_register_script( 'wp-element', plugins_url( 'element/build/index.js', __FILE__ ), array( 'react', 'react-dom' ) ); wp_register_script( 'wp-blocks', plugins_url( 'blocks/build/index.js', __FILE__ ), array( 'wp-element', 'tinymce-nightly' ) ); + wp_register_style( 'wp-blocks', plugins_url( 'blocks/build/style.css', __FILE__ ) ); } add_action( 'init', 'gutenberg_register_scripts' ); @@ -206,7 +207,8 @@ function gutenberg_scripts_and_styles( $hook ) { ); wp_enqueue_style( 'wp-editor', - plugins_url( 'editor/build/style.css', __FILE__ ) + plugins_url( 'editor/build/style.css', __FILE__ ), + array( 'wp-blocks' ) ); } add_action( 'admin_enqueue_scripts', 'gutenberg_scripts_and_styles' );