2020-11-12 19:36:15 +01:00
|
|
|
// Responsive breakpoints mixin
|
|
|
|
@mixin add_variables( $view: frontend ) {
|
|
|
|
|
|
|
|
@if frontend == $view {
|
|
|
|
|
|
|
|
:root {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@if editor == $view {
|
|
|
|
|
|
|
|
:root,
|
|
|
|
body {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Button style
|
|
|
|
// - Applies button styles to blocks and elements that share them.
|
|
|
|
@mixin button-style() {
|
2021-01-20 06:51:02 +01:00
|
|
|
border: var(--button--border-width) solid transparent;
|
|
|
|
border-radius: var(--button--border-radius);
|
2020-11-12 19:36:15 +01:00
|
|
|
cursor: pointer;
|
|
|
|
font-weight: var(--button--font-weight);
|
|
|
|
font-family: var(--button--font-family);
|
|
|
|
font-size: var(--button--font-size);
|
2021-01-20 06:51:02 +01:00
|
|
|
line-height: var(--button--line-height);
|
2020-11-12 19:36:15 +01:00
|
|
|
padding: var(--button--padding-vertical) var(--button--padding-horizontal);
|
2021-01-20 06:51:02 +01:00
|
|
|
text-decoration: none;
|
2020-11-12 19:36:15 +01:00
|
|
|
|
2021-01-20 06:51:02 +01:00
|
|
|
// Standard Button Color Relationship Logic
|
|
|
|
&:not(:hover):not(:active) {
|
|
|
|
|
|
|
|
// Text colors
|
|
|
|
&:not(.has-text-color) {
|
|
|
|
color: var(--global--color-background);
|
2020-11-12 19:36:15 +01:00
|
|
|
|
2021-01-20 06:51:02 +01:00
|
|
|
// Nested
|
|
|
|
.has-background & {
|
|
|
|
color: var(--local--color-background, var(--global--color-primary));
|
|
|
|
|
|
|
|
&.has-background {
|
|
|
|
color: var(--global--color-primary);
|
|
|
|
}
|
|
|
|
}
|
2020-11-12 19:36:15 +01:00
|
|
|
}
|
|
|
|
|
2021-01-20 06:51:02 +01:00
|
|
|
// Background-colors
|
2020-11-12 19:36:15 +01:00
|
|
|
&:not(.has-background) {
|
2021-01-20 06:51:02 +01:00
|
|
|
background-color: var(--global--color-primary);
|
|
|
|
|
|
|
|
// Nested
|
|
|
|
.has-background & {
|
|
|
|
background-color: var(--local--color-primary, var(--global--color-primary));
|
|
|
|
}
|
2020-11-12 19:36:15 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-20 06:51:02 +01:00
|
|
|
// Hover Button color should match parent element foreground color
|
|
|
|
&:hover,
|
|
|
|
&:active {
|
|
|
|
background-color: transparent;
|
|
|
|
border-color: currentColor;
|
|
|
|
color: inherit;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Focus Button outline color should always match the current text color
|
|
|
|
&:focus {
|
|
|
|
outline-offset: -6px;
|
|
|
|
outline: 2px dotted currentColor;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Disabled Button colors
|
2020-11-12 19:36:15 +01:00
|
|
|
&:disabled {
|
|
|
|
background-color: var(--global--color-white-50);
|
|
|
|
border-color: var(--global--color-white-50);
|
|
|
|
color: var(--button--color-text-active);
|
|
|
|
}
|
|
|
|
}
|
Twenty Twenty-One: Sync the latest changes for 5.6 RC2.
This will be the final sync from GitHub before placing that repository into read-only mode. All further changes should now flow entirely through Trac.
For a full list of changes since [49633], see https://github.com/WordPress/twentytwentyone/compare/1d5a895...53acd9b.
Props poena, luminuu, kjellr, ryelle, allancole, melchoyce, felipeelia, aljullu, kebbet, chaton666, Clorith, mkaz, ingereck, paaljoachim.
See #51526.
Built from https://develop.svn.wordpress.org/trunk@49726
git-svn-id: http://core.svn.wordpress.org/trunk@49449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-01 20:09:05 +01:00
|
|
|
|
|
|
|
@mixin innerblock-margin-clear($container) {
|
|
|
|
|
|
|
|
// Clear the top margin for the first-child.
|
|
|
|
> #{$container} > *:first-child {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Last child that is not the appender.
|
|
|
|
> #{$container} > *:last-child:not(.block-list-appender) {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// When selected, the last item becomes the second last because of the appender.
|
|
|
|
&.has-child-selected > #{$container} > *:nth-last-child(2),
|
|
|
|
&.is-selected > #{$container} > *:nth-last-child(2) {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
}
|