Twenty Twenty-One: Fix obsolete navigation block styles for better Global Styles support.

This changeset removes CSS custom properties that targets navigation menu items to avoid preventing the block from inheriting padding values set by the Global Styles system.

Props Joen, desrosj, poena.
Fixes #53220.

Built from https://develop.svn.wordpress.org/trunk@55088


git-svn-id: http://core.svn.wordpress.org/trunk@54621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2023-01-18 13:33:12 +00:00
parent 69f0cb5e3f
commit b93aa43140
11 changed files with 11918 additions and 14711 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,6 @@
Adding print support. The print styles are based on the the great work of
Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/.
*/
/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
@ -13,12 +12,10 @@ Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272
# Visibility
--------------------------------------------------------------*/
@media print {
/* Margins & paddings */
@page {
margin: 2cm;
}
.entry .entry-header,
.entry,
.single .site-main > article > .entry-footer {
@ -176,3 +173,5 @@ Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272
background: none;
}
}
/*# sourceMappingURL=print.css.map */

View File

@ -1,6 +1,5 @@
/* OS dark theme preference */
@media only screen {
.is-dark-theme.is-dark-theme {
--global--color-background: var(--global--color-dark-gray);
--global--color-primary: var(--global--color-light-gray);
@ -11,7 +10,6 @@
--button--color-background: var(--global--color-secondary);
--button--color-background-active: var(--global--color-background);
--global--color-border: #9ea1a7;
/* Block: Table */
--table--stripes-border-color: rgba(240, 240, 240, 0.15);
--table--stripes-background-color: rgba(240, 240, 240, 0.15);
@ -40,74 +38,57 @@
color: var(--button--color-background);
z-index: 9998;
}
.no-js #dark-mode-toggler {
display: none;
}
#dark-mode-toggler.fixed-bottom {
position: fixed;
bottom: 5px;
left: 5px;
transition: bottom 0.5s;
}
#dark-mode-toggler.fixed-bottom.hide:not(:focus) {
bottom: -80px;
}
#dark-mode-toggler.relative {
position: absolute;
height: 44px;
top: calc(2.4 * var(--global--spacing-vertical) - 44px);
left: calc(50vw - var(--responsive--alignwide-width) / 2 - 0.5em);
}
.admin-bar #dark-mode-toggler.relative {
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 32px);
}
}
@media only screen and (max-width: 782px) {
.admin-bar #dark-mode-toggler.relative {
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 46px);
}
}
@media only screen and (max-width: 481px) {
.admin-bar #dark-mode-toggler.relative {
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 26px);
}
}
@media only screen and (max-width: 481px) {
body:not(.primary-navigation-open) #dark-mode-toggler.relative ~ nav {
top: 88px;
top: calc(44px + 44px);
}
}
@media only screen {
.primary-navigation-open #dark-mode-toggler {
display: none;
}
}
@media only screen {
#dark-mode-toggler:hover,
#dark-mode-toggler:focus {
#dark-mode-toggler:hover, #dark-mode-toggler:focus {
color: var(--button--color-background-active);
border: 2px solid var(--button--color-text-active);
background-color: var(--button--color-text-active);
}
}
@media only screen {
.is-IE #dark-mode-toggler {
display: none;
}
}
@media only screen and (prefers-reduced-motion: no-preference) {
#dark-mode-toggler.fixed-bottom {
transition: bottom 0.5s;
}
}

View File

@ -1,6 +1,5 @@
/* OS dark theme preference */
@media only screen {
.is-dark-theme.is-dark-theme {
--global--color-background: var(--global--color-dark-gray);
--global--color-primary: var(--global--color-light-gray);
@ -11,7 +10,6 @@
--button--color-background: var(--global--color-secondary);
--button--color-background-active: var(--global--color-background);
--global--color-border: #9ea1a7;
/* Block: Table */
--table--stripes-border-color: rgba(240, 240, 240, 0.15);
--table--stripes-background-color: rgba(240, 240, 240, 0.15);
@ -40,74 +38,59 @@
color: var(--button--color-background);
z-index: 9998;
}
.no-js #dark-mode-toggler {
display: none;
}
#dark-mode-toggler.fixed-bottom {
position: fixed;
bottom: 5px;
right: 5px;
transition: bottom 0.5s;
}
#dark-mode-toggler.fixed-bottom.hide:not(:focus) {
bottom: -80px;
}
#dark-mode-toggler.relative {
position: absolute;
height: 44px;
top: calc(2.4 * var(--global--spacing-vertical) - 44px);
right: calc(50vw - var(--responsive--alignwide-width) / 2 - 0.5em);
}
.admin-bar #dark-mode-toggler.relative {
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 32px);
}
}
@media only screen and (max-width: 782px) {
.admin-bar #dark-mode-toggler.relative {
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 46px);
}
}
@media only screen and (max-width: 481px) {
.admin-bar #dark-mode-toggler.relative {
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 26px);
}
}
@media only screen and (max-width: 481px) {
body:not(.primary-navigation-open) #dark-mode-toggler.relative ~ nav {
top: 88px;
top: calc(44px + 44px);
}
}
@media only screen {
.primary-navigation-open #dark-mode-toggler {
display: none;
}
}
@media only screen {
#dark-mode-toggler:hover,
#dark-mode-toggler:focus {
#dark-mode-toggler:hover, #dark-mode-toggler:focus {
color: var(--button--color-background-active);
border: 2px solid var(--button--color-text-active);
background-color: var(--button--color-text-active);
}
}
@media only screen {
.is-IE #dark-mode-toggler {
display: none;
}
}
@media only screen and (prefers-reduced-motion: no-preference) {
#dark-mode-toggler.fixed-bottom {
transition: bottom 0.5s;
}
}
/*# sourceMappingURL=style-dark-mode.css.map */

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,16 @@
.wp-block-navigation {
[data-block] {
margin-top: revert;
margin-bottom: revert;
}
.wp-block-navigation__container {
background: var(--global--color-background);
padding: 0;
}
.wp-block-navigation-link {
.wp-block-navigation-link__content {
padding: var(--primary-nav--padding);
}
.wp-block-navigation-link__label {
font-family: var(--primary-nav--font-family);
font-size: var(--primary-nav--font-size);

View File

@ -1,12 +1,6 @@
.wp-block-navigation {
.wp-block-navigation-link {
padding: 0;
.wp-block-navigation-link__content {
padding: var(--primary-nav--padding);
}
.wp-block-navigation-link__label {
font-family: var(--primary-nav--font-family);
font-size: var(--primary-nav--font-size);
@ -30,35 +24,16 @@
.wp-block-navigation__container {
border: none;
left: 0;
margin-left: var(--primary-nav--padding);
min-width: max-content;
opacity: 0;
padding: 0;
position: inherit;
top: inherit;
.wp-block-navigation-link {
.wp-block-navigation-link__content {
display: inline-block;
padding: calc(0.5 * var(--primary-nav--padding)) var(--primary-nav--padding);
}
}
.wp-block-navigation-link__submenu-icon {
display: none;
}
}
&:hover,
&:focus-within {
.wp-block-navigation__container {
display: block;
opacity: 1;
visibility: visible;
}
}
}
> .has-child {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-alpha-55087';
$wp_version = '6.2-alpha-55088';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.