diff --git a/includes/class-create-block-theme-editor-tools.php b/includes/class-create-block-theme-editor-tools.php index 6f8efef2..4a940cda 100644 --- a/includes/class-create-block-theme-editor-tools.php +++ b/includes/class-create-block-theme-editor-tools.php @@ -28,6 +28,12 @@ function create_block_theme_sidebar_enqueue() { $asset_file['dependencies'], $asset_file['version'] ); + wp_enqueue_style( + 'create-block-theme-styles', + plugins_url( 'build/plugin-sidebar.css', dirname( __FILE__ ) ), + array(), + $asset_file['version'] + ); wp_enqueue_script( 'create-block-theme-slot-fill', ); diff --git a/src/editor-sidebar/json-editor-modal.js b/src/editor-sidebar/json-editor-modal.js index 3776fee5..11d367ca 100644 --- a/src/editor-sidebar/json-editor-modal.js +++ b/src/editor-sidebar/json-editor-modal.js @@ -33,13 +33,14 @@ const ThemeJsonEditorModal = ( { onRequestClose } ) => { return ( { return ( @@ -305,12 +306,7 @@ ${ __( 'Source', 'create-block-theme' ) }` } + + + ); }; diff --git a/src/plugin-sidebar.js b/src/plugin-sidebar.js index 2a08ca59..9d30ec5d 100644 --- a/src/plugin-sidebar.js +++ b/src/plugin-sidebar.js @@ -49,6 +49,7 @@ import { ThemeMetadataEditorModal } from './editor-sidebar/metadata-editor-modal import ScreenHeader from './editor-sidebar/screen-header'; import { downloadExportedTheme } from './resolvers'; import downloadFile from './utils/download-file'; +import './plugin-styles.scss'; const CreateBlockThemePlugin = () => { const [ isEditorOpen, setIsEditorOpen ] = useState( false ); diff --git a/src/plugin-styles.scss b/src/plugin-styles.scss new file mode 100644 index 00000000..4af13616 --- /dev/null +++ b/src/plugin-styles.scss @@ -0,0 +1,25 @@ +$plugin-prefix: "create-block-theme"; +$modal-footer-height: 70px; + +.#{$plugin-prefix} { + &__metadata-editor-modal { + padding-bottom: $modal-footer-height; + + &__footer { + border-top: 1px solid #ddd; + background-color: #fff; + position: absolute; + bottom: 0; + margin: 0 -32px; + padding: 16px 32px; + height: $modal-footer-height; + } + + &__screenshot { + max-width: 200px; + height: auto; + aspect-ratio: 4 / 3; + object-fit: cover; + } + } +}