Skip to content
Draft
Changes from 1 commit
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
24 changes: 24 additions & 0 deletions lib/Styles/Common/_controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,29 @@
scale-color($highlight_color, $alpha: -70%)
);
}

// FIXME: replace with accent color when we merge https://github.com/elementary/granite/pull/704
&:focus {
@if $color-scheme == "light" {
border-color: #{'@BLUEBERRY_500'};
outline-color: #{'alpha(@BLUEBERRY_500, 0.3)'};
} @else {
border-color: #{'@BLUEBERRY_900'};
outline-color: #{'alpha(@BLUEBERRY_300, 0.3)'};
}

outline-width: rem(2px);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately we still have elementary/stylesheet#904 with linked buttons. I wonder if maybe we should forget the outline property and use box-shadow?

Copy link
Member

@wpkelso wpkelso Mar 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth exploring. Using box-shadow might also remove some of the funky effects of the shadow and the focus indicator overlapping.

image

outline-style: solid;

animation: unfocus 600ms easing() 1s 1;
animation-fill-mode: forwards;
}

@keyframes unfocus {
to {
border-color: $border-color;
outline-width: 0;
}
}
}