Skip to content

Commit

Permalink
refactor: provide possibility for a second focus color (#3153)
Browse files Browse the repository at this point in the history
* refactor: readded focus box-shadow

* refactor: provide this property within the Styling API

* refactor: simplification

as discussed and decided by @leape, @nmerget and myself, we're only providing the Styling API and the offset has a transparent color as a default.

---------

Co-authored-by: Nicolas Merget <[email protected]>
  • Loading branch information
mfranzke and nmerget authored Sep 11, 2024
1 parent 92b271d commit 03079be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/foundations/scss/helpers/_focus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
@use "../colors";

%focus-placeholder {
outline: #{variables.$db-border-height-2xs} solid #{colors.$db-informational-on-bg-basic-emphasis-80-default};
outline: #{variables.$db-border-height-2xs} solid var(--db-focus-outline-color, #{colors.$db-informational-on-bg-basic-emphasis-80-default});
outline-offset: variables.$db-border-height-xs;
box-shadow: 0 0 0 #{variables.$db-border-height-xs} var(--db-focus-box-shadow-bg-color, transparent);

&:not([type="radio"], [role="switch"]) {
border-radius: variables.$db-border-radius-xs;
Expand Down

0 comments on commit 03079be

Please sign in to comment.