Skip to content

Commit 90e52ae

Browse files
HDS-5666 Add outline color for CodeBlock CopyButton focus state
1 parent 76f867b commit 90e52ae

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

packages/components/src/styles/components/code-block/index.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,7 @@ $hds-code-block-code-footer-height: 48px;
180180
color: var(--hds-code-block-color-foreground-primary);
181181
background-color: var(--hds-code-block-color-surface-faint);
182182
border-color: var(--hds-code-block-color-focus-action-internal);
183-
184-
&::before {
185-
border-color: var(--hds-code-block-color-focus-action-external);
186-
}
183+
outline-color: var(--hds-code-block-color-focus-action-external);
187184
}
188185

189186
.hds-icon {

showcase/public/assets/styles/@hashicorp/design-system-components-common.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3777,12 +3777,7 @@ button.hds-button[href]::after {
37773777
color: var(--hds-code-block-color-foreground-primary);
37783778
background-color: var(--hds-code-block-color-surface-faint);
37793779
border-color: var(--hds-code-block-color-focus-action-internal);
3780-
}
3781-
.hds-code-block__height-toggle-button:focus::before, .hds-code-block__height-toggle-button.mock-focus::before, .hds-code-block__height-toggle-button:focus-visible::before,
3782-
.hds-code-block__copy-button:focus::before,
3783-
.hds-code-block__copy-button.mock-focus::before,
3784-
.hds-code-block__copy-button:focus-visible::before {
3785-
border-color: var(--hds-code-block-color-focus-action-external);
3780+
outline-color: var(--hds-code-block-color-focus-action-external);
37863781
}
37873782
.hds-code-block__height-toggle-button .hds-icon,
37883783
.hds-code-block__copy-button .hds-icon {

showcase/public/assets/styles/@hashicorp/design-system-components.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4313,12 +4313,7 @@ button.hds-button[href]::after {
43134313
color: var(--hds-code-block-color-foreground-primary);
43144314
background-color: var(--hds-code-block-color-surface-faint);
43154315
border-color: var(--hds-code-block-color-focus-action-internal);
4316-
}
4317-
.hds-code-block__height-toggle-button:focus::before, .hds-code-block__height-toggle-button.mock-focus::before, .hds-code-block__height-toggle-button:focus-visible::before,
4318-
.hds-code-block__copy-button:focus::before,
4319-
.hds-code-block__copy-button.mock-focus::before,
4320-
.hds-code-block__copy-button:focus-visible::before {
4321-
border-color: var(--hds-code-block-color-focus-action-external);
4316+
outline-color: var(--hds-code-block-color-focus-action-external);
43224317
}
43234318
.hds-code-block__height-toggle-button .hds-icon,
43244319
.hds-code-block__copy-button .hds-icon {

0 commit comments

Comments
 (0)