Skip to content

Commit

Permalink
Some design tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Sep 20, 2021
1 parent 1e65bf8 commit ec8f7c8
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 27 deletions.
70 changes: 43 additions & 27 deletions packages/edit-site/src/components/sidebar/global-styles-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import {
__experimentalNavigation as Navigation,
__experimentalNavigationItem as NavigationItem,
__experimentalNavigationMenu as NavigationMenu,
__experimentalNavigationGroup as NavigationGroup,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { getBlockType } from '@wordpress/blocks';
import { styles } from '@wordpress/icons';
import { layout, brush, styles, typography } from '@wordpress/icons';

/**
* Internal dependencies
Expand Down Expand Up @@ -63,27 +64,32 @@ function GlobalStylesLevel( {

return (
<>
{ hasTypographyPanel && (
<NavigationItem
item="item-typography"
navigateToMenu={ parentMenu + '.typography' }
title={ __( 'Typography' ) }
/>
) }
{ hasColorPanel && (
<NavigationItem
item="item-color"
navigateToMenu={ parentMenu + '.color' }
title={ __( 'Colors' ) }
/>
) }
{ hasLayoutPanel && (
<NavigationItem
item="item-layout"
navigateToMenu={ parentMenu + '.layout' }
title={ __( 'Layout' ) }
/>
) }
<NavigationGroup>
{ hasTypographyPanel && (
<NavigationItem
item="item-typography"
navigateToMenu={ parentMenu + '.typography' }
icon={ typography }
title={ __( 'Typography' ) }
/>
) }
{ hasColorPanel && (
<NavigationItem
item="item-color"
navigateToMenu={ parentMenu + '.color' }
title={ __( 'Colors' ) }
icon={ brush }
/>
) }
{ hasLayoutPanel && (
<NavigationItem
item="item-layout"
navigateToMenu={ parentMenu + '.layout' }
title={ __( 'Layout' ) }
icon={ layout }
/>
) }
</NavigationGroup>

{ hasTypographyPanel && (
<NavigationMenu
Expand Down Expand Up @@ -189,11 +195,21 @@ export default function GlobalStylesSidebar() {
getSetting={ getSetting }
setSetting={ setSetting }
/>
<NavigationItem
item="item-blocks"
navigateToMenu="blocks"
title={ __( 'Blocks' ) }
/>
<NavigationGroup className="edit-site-global-styles-sidebar__blocks-group">
<NavigationItem
className="edit-site-global-styles-sidebar__blocks-group-help"
isText
>
{ __(
'Customize the appearance of specific blocks for the whole site'
) }
</NavigationItem>
<NavigationItem
item="item-blocks"
navigateToMenu="blocks"
title={ __( 'Blocks' ) }
/>
</NavigationGroup>
</NavigationMenu>
<NavigationMenu
menu="blocks"
Expand Down
14 changes: 14 additions & 0 deletions packages/edit-site/src/components/sidebar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,23 @@

.edit-site-global-styles-sidebar .components-navigation__menu-title-heading {
font-size: $default-font-size * 1.2;
font-weight: 500;
}

.edit-site-global-styles-sidebar .components-navigation__item > button span {
font-weight: 500;
}

.edit-site-typography-panel,
.edit-site-global-styles-sidebar .block-editor-panel-color-gradient-settings {
border: 0;
}

.edit-site-global-styles-sidebar__blocks-group {
padding-top: $grid-unit-30;
border-top: $border-width solid $gray-200;
}

.edit-site-global-styles-sidebar__blocks-group-help {
padding: 0 $grid-unit-20;
}

0 comments on commit ec8f7c8

Please sign in to comment.