Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

### Bug Fixes

- `Tabs`, `TabPanel`: Expand vertical tab interaction backgrounds and focus rings across the row ([#84821](https://github.com/WordPress/gutenberg/pull/84821)).
- `StyleProvider`: Register module styles before children measure layout in iframe documents ([#84736](https://github.com/WordPress/gutenberg/pull/84736)).
- `BorderBoxControl`: Unpack multi-value CSS box shorthand strings (such as `"0 0 0 2px"`) into individual side widths when splitting borders ([#84826](https://github.com/WordPress/gutenberg/pull/84826)).
- `SelectControl`: Preserve the minimal variant's inline layout in iframe documents ([#84732](https://github.com/WordPress/gutenberg/pull/84732)).
Expand Down
30 changes: 4 additions & 26 deletions packages/components/src/tab-panel/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
&:focus-visible {
color: var(--wpds-color-foreground-interactive-neutral-active);

&::before,
& .components-tab-panel__tabs-item-label::before {
&::before {
background-color: var(--wpds-color-background-interactive-neutral-weak-active);
}
}
Expand Down Expand Up @@ -85,48 +84,27 @@
// Interaction background and focus ring.
&::before {
content: "";
}

&::before,
& .components-tab-panel__tabs-item-label::before {
position: absolute;
z-index: -1;
inset: var(--wpds-dimension-padding-md);
pointer-events: none;
border-radius: var(--wpds-border-radius-sm);
}

&:focus-visible::before,
&:focus-visible .components-tab-panel__tabs-item-label::before {
&:focus-visible::before {
@include outset-ring__focus();
outline-offset: 0;
}

.components-tab-panel__tabs[aria-orientation="vertical"] & {
&::before {
content: none;
}

&.has-icon::before {
content: "";
inset-block: var(--wpds-dimension-padding-sm);
inset-inline-start:
calc(50% - var(--wpds-dimension-size-sm) /
2 - var(--wpds-dimension-padding-xs));
inset-inline-end: auto;
width:
calc(var(--wpds-dimension-size-sm) + 2 *
var(--wpds-dimension-padding-xs));
inset: 0;
outline-offset: calc(-1 * var(--wpds-border-width-focus));
}

& .components-tab-panel__tabs-item-label {
position: relative;
display: inline-flex;

&::before {
content: "";
inset: calc(-1 * var(--wpds-dimension-padding-xs));
}
}

&::after {
Expand Down
23 changes: 10 additions & 13 deletions packages/components/src/tabs/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
&::before {
top: var(--wpds-dimension-padding-md);
inset-inline-start: 0;
z-index: 1;
width: var(--wp-admin-border-width-focus);
height: max(0px, calc(var(--selected-height, 0) * 1px - 2 * var(--wpds-dimension-padding-md)));
transform: translateY(calc(var(--selected-top, 0) * 1px));
Expand Down Expand Up @@ -134,8 +135,7 @@
) {
color: var(--wpds-color-foreground-interactive-neutral-active);

&::after,
& .tab-children::after {
&::after {
background-color: var(--wpds-color-background-interactive-neutral-weak-active);
opacity: 1;
}
Expand All @@ -149,8 +149,7 @@
// Interaction background and focus indicator.
position: relative;
isolation: isolate;
&::after,
& .tab-children::after {
&::after {
position: absolute;
z-index: -1;
pointer-events: none;
Expand All @@ -168,8 +167,7 @@
}
}

&[data-focus-visible]::after,
&[data-focus-visible] .tab-children::after {
&[data-focus-visible]::after {
outline-color: $components-color-accent;
opacity: 1;
}
Expand All @@ -189,6 +187,12 @@
[aria-orientation="vertical"] & {
padding: var(--wpds-dimension-padding-md);
min-height: var(--wpds-dimension-size-lg);

&::after {
content: "";
inset: 0;
outline-offset: calc(-1 * var(--wp-admin-border-width-focus));
}
}
}

Expand All @@ -202,14 +206,7 @@
justify-content: center;
}
[aria-orientation="vertical"] & {
flex-grow: 0;
position: relative;
justify-content: start;

&::after {
content: "";
inset: calc(-1 * var(--wpds-dimension-padding-xs));
}
}
}

Expand Down
1 change: 1 addition & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

### Bug Fixes

- `Tabs`: Expand vertical tab interaction backgrounds and focus rings across the row ([#84821](https://github.com/WordPress/gutenberg/pull/84821)).
- Keep the `Link` new-tab indicator with the preceding text when wrapping ([#84806](https://github.com/WordPress/gutenberg/pull/84806)).
- `Select`: Keep long popup lists scrollable when item alignment falls back to anchored positioning or the popup opens through touch ([#84682](https://github.com/WordPress/gutenberg/pull/84682)).
- `Combobox.Input`, `SearchableSelect`, and `SearchableSelectControl`: Orient the search icon toward the top left in LTR and the top right in RTL ([#84690](https://github.com/WordPress/gutenberg/pull/84690)).
Expand Down
22 changes: 9 additions & 13 deletions packages/ui/src/tabs/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,15 @@
) {
color: var(--wpds-color-foreground-interactive-neutral-active);

&::after,
& .tab-children::after {
&::after {
background-color: var(--wpds-color-background-interactive-neutral-weak-active);
opacity: 1;
}
}

/* Interaction background and focus indicator. */
&::before,
&::after,
& .tab-children::after {
&::after {
position: absolute;
z-index: -1;
pointer-events: none;
Expand All @@ -177,8 +175,7 @@
}
}

&:focus-visible::after,
&:focus-visible .tab-children::after {
&:focus-visible::after {
outline-color: var(--wpds-color-stroke-focus);
opacity: 1;
}
Expand Down Expand Up @@ -242,6 +239,12 @@
[data-orientation="vertical"] & {
padding: var(--wpds-dimension-padding-md);
min-height: var(--wpds-dimension-size-lg);

&::after {
content: "";
inset: 0;
outline-offset: calc(-1 * var(--wpds-border-width-focus));
}
}
}

Expand All @@ -256,14 +259,7 @@
}

[data-orientation="vertical"] & {
flex-grow: 0;
position: relative;
justify-content: start;

&::after {
content: "";
inset: calc(-1 * var(--wpds-dimension-padding-xs));
}
}
}
}
Expand Down
Loading