-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
195 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ Thumbs.db | |
|
||
# Compiled CSS | ||
*.css | ||
style.css | ||
|
||
# Compiled Javascript | ||
/dist/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Add style to 'flatten' the Navigation block for mobile screens. | ||
// TODO: Restrict this to just the vertical block vatiation. | ||
// See: https://github.com/WordPress/gutenberg/issues/40621 | ||
wp.domReady( () => { | ||
wp.blocks.registerBlockStyle( 'core/navigation', { | ||
name: 'flatten', | ||
label: 'Flatten Vertical Navigation', | ||
} ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
import '../shared/_shared-module'; | ||
|
||
console.log( 'editor JS single entrypoint file' ); | ||
import './block-styles/navigation-styles.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import url( './_navigation-styles.scss' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.wp-block-navigation { | ||
&.is-style-flatten { | ||
// TODO: restrict this just to the vertical block variation. | ||
// In the meantime, we'll use CSS so the styles are only applied there. | ||
// See: https://github.com/WordPress/gutenberg/issues/40621. | ||
&.is-vertical { | ||
.wp-block-navigation-item { | ||
flex-wrap: wrap; | ||
} | ||
|
||
.wp-block-navigation__submenu-icon { | ||
display: none; | ||
} | ||
|
||
.wp-block-navigation__submenu-container { | ||
overflow: visible; | ||
} | ||
|
||
&:not(.has-background) .wp-block-navigation__submenu-container { | ||
background: transparent; | ||
} | ||
|
||
&:not( .has-text-color) .wp-block-navigation__submenu-container { | ||
color: inherit; | ||
} | ||
|
||
.has-child { | ||
gap: var(--wp--preset--spacing--30); | ||
|
||
.wp-block-navigation__submenu-container { | ||
border: 0; | ||
border-radius: 0; | ||
box-shadow: none; | ||
gap: inherit; | ||
height: unset; | ||
padding: 0 0 0 var(--wp--preset--spacing--30); | ||
position: static; | ||
opacity: unset; | ||
visibility: unset; | ||
} | ||
|
||
.wp-block-navigation__submenu-container, | ||
.wp-block-navigation-submenu__toggle[aria-expanded='true']~.wp-block-navigation__submenu-container, | ||
&:not(.open-on-click):hover>.wp-block-navigation__submenu-container { | ||
width: 100%; | ||
} | ||
|
||
&.has-child-selected>.wp-block-navigation__submenu-container, | ||
&.is-selected>.wp-block-navigation__submenu-container { | ||
width: 100% !important; | ||
} | ||
} | ||
|
||
&.has-background .has-child { | ||
gap: var(--wp--preset--spacing--20); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,35 @@ | ||
.wp-block-search__button svg { | ||
vertical-align: middle | ||
} | ||
.wp-block-search { | ||
|
||
.wp-block-search__button.has-icon { | ||
line-height: 1; | ||
padding: 0.75rem; | ||
|
||
svg { | ||
min-height: var(--wp--preset--spacing--40); | ||
min-width: var(--wp--preset--spacing--40); | ||
vertical-align: middle; | ||
} | ||
} | ||
|
||
&__button-inside { | ||
.wp-block-search__inside-wrapper { | ||
border-radius: var( --wp--custom--border--radius ); | ||
box-sizing: border-box; | ||
} | ||
|
||
.wp-block-search__button { | ||
border-radius: calc( var( --wp--custom--border--radius ) / 2 ); | ||
} | ||
|
||
&.wp-block-search__icon-button { | ||
.wp-block-search__inside-wrapper { | ||
padding: calc( var(--wp--preset--spacing--20) - 1px ); // maddening, but the math isn't working -- the search should be 52px tall, but is 54px. | ||
} | ||
|
||
.wp-block-search__button { | ||
padding: 0.375rem; | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.