Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions packages/edit-site/src/components/global-styles/screen-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { ExternalLink } from '@wordpress/components';
import {
Button,
Navigator,
ExternalLink,
__experimentalSpacer as Spacer,
} from '@wordpress/components';
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
import { useDispatch } from '@wordpress/data';

Expand All @@ -18,9 +23,6 @@ const { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock(
);

function ScreenCSS() {
const description = __(
'Add your own CSS to customize the appearance and layout of your site.'
);
const [ style ] = useGlobalStyle( '', undefined, 'user', {
shouldDecodeEncode: false,
} );
Expand All @@ -35,10 +37,12 @@ function ScreenCSS() {
return (
<>
<ScreenHeader
title={ __( 'CSS' ) }
title={ __( 'Additional CSS' ) }
description={
<>
{ description }
{ __(
'You can add custom CSS to further customize the appearance and layout of your site.'
) }
<br />
<ExternalLink
href={ __(
Expand All @@ -54,6 +58,13 @@ function ScreenCSS() {
setEditorCanvasContainerView( undefined );
} }
/>
<Spacer margin={ 0 } paddingX={ 4 }>
<Navigator.Button as={ Button } variant="link" path="/blocks">
{ __(
'Want to change block appearance? Use the Blocs section instead.'
) }
</Navigator.Button>
</Spacer>
<div className="edit-site-global-styles-screen-css">
<StylesAdvancedPanel
value={ style }
Expand Down
12 changes: 1 addition & 11 deletions packages/edit-site/src/components/global-styles/screen-root.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function ScreenRoot() {
* the nav button inset should be looked at before reusing further.
*/
paddingX="13px"
marginBottom={ 4 }
marginBottom={ 2 }
>
{ __(
'Customize the appearance of specific blocks for the whole site.'
Expand All @@ -114,16 +114,6 @@ function ScreenRoot() {
<>
<CardDivider />
<CardBody>
<Spacer
as="p"
paddingTop={ 2 }
paddingX="13px"
marginBottom={ 4 }
>
{ __(
'Add your own CSS to customize the appearance and layout of your site.'
) }
</Spacer>
<ItemGroup>
<NavigationButtonAsItem path="/css">
<HStack justify="space-between">
Expand Down
Loading