Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
/* Doubled class so the background survives the host app's global
`[type='button'] { background-color: transparent }` reset. */
.attachmentRemove.attachmentRemove {
background-color: var(--color-frame-surface);
background: var(--color-frame-surface);
color: var(--color-frame-text);
}

Expand Down Expand Up @@ -270,8 +270,9 @@
}

.attachmentRemove.attachmentRemove:hover,
.attachmentRemove.attachmentRemove:focus-visible {
background-color: var(--color-frame-bg);
.attachmentRemove.attachmentRemove:focus-visible,
.attachmentRemove.attachmentRemove:active {
background: var(--color-frame-bg);
color: var(--color-frame-text);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@
padding: 0;
border: 1px solid var(--wpds-color-stroke-surface-neutral);
border-radius: 999px;
background-color: var(--wpds-color-bg-surface-neutral);
color: var(--wpds-color-fg-content-neutral);
box-shadow: var(--wpds-elevation-small, 0 1px 2px rgb(0 0 0 / 16%));
cursor: pointer;
opacity: 0;
Expand All @@ -162,6 +160,14 @@
transition: opacity 120ms ease, transform 120ms ease;
}

/* Doubled class keeps the native button background above generic button resets. */
.attachmentRemove.attachmentRemove,
.attachmentRemove.attachmentRemove:focus:not(:focus-visible) {
background: var(--wpds-color-bg-surface-neutral);
border-color: var(--wpds-color-stroke-surface-neutral);
color: var(--wpds-color-fg-content-neutral);
}

.attachmentItem:hover .attachmentRemove,
.attachmentItem:focus-within .attachmentRemove {
opacity: 1;
Expand Down Expand Up @@ -260,9 +266,13 @@
}
}

.attachmentRemove:hover,
.attachmentRemove:focus-visible {
background-color: var(--wpds-color-bg-surface-neutral-weak, #f4f4f4);
.attachmentItem:hover .attachmentRemove.attachmentRemove,
.attachmentItem:focus-within .attachmentRemove.attachmentRemove,
.attachmentRemove.attachmentRemove:hover,
.attachmentRemove.attachmentRemove:focus-visible,
.attachmentRemove.attachmentRemove:active {
background: var(--wpds-color-bg-surface-neutral-weak, #f4f4f4);
border-color: var(--wpds-color-stroke-surface-neutral);
color: var(--wpds-color-fg-content-neutral);
}

Expand Down