Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global variable to enable box-shadow for focused inputs/buttons (v5) #33413

Closed
WinterSilence opened this issue Mar 20, 2021 · 6 comments
Closed

Comments

@WinterSilence
Copy link
Contributor

Now we have $enable-shadows, but this var does not affect box-shadows used for focus states. I vote to add additional variable $enable-shadows-on-focus (or something like this) to toggle box-shadow on focus/hover/active.

Also, I vote to add additional validation like as @if $enable-shadows-on-focus and $input-btn-focus-box-shadow != none.

@korki43
Copy link

korki43 commented Mar 20, 2021

You can set $input-btn-focus-width to 0 disable box-shadows for focused buttons and inputs.

@WinterSilence
Copy link
Contributor Author

WinterSilence commented Mar 20, 2021

@korki43 Yes, but why do you need unnecessary properties? it's garbage

@ffoodd
Copy link
Member

ffoodd commented Mar 22, 2021

Duplicate of #32412, #32032 and clarified in the docs in #32685.

We set our focus styles using shadows, and since we couldn't ensure anyone disabling those shadows would set proper focus styles, we don't provide a way to change this.

Focus styles are mandatory, using box-shadow allows more theming than keeping outline.

@ffoodd ffoodd closed this as completed Mar 22, 2021
@ffoodd ffoodd added duplicate and removed feature labels Mar 22, 2021
@WinterSilence
Copy link
Contributor Author

WinterSilence commented Mar 22, 2021

@ffoodd

Duplicate of #32412, #32032 and clarified in the docs in #32685.

it's not 5.x and I vote to add additional variable

We set our focus styles using shadows, and since we couldn't ensure anyone disabling those shadows would set proper focus styles, we don't provide a way to change this.

How can users not want any "outer glow" on focusing? Changing background and border color is enough for me.

Focus styles are mandatory, using box-shadow allows more theming than keeping outline.

I don't dispute that.

@ffoodd
Copy link
Member

ffoodd commented Mar 22, 2021

The first one is v5 and the PR too. If you've read discussions you'd noticed adding such variable has been suggested already.

Changing background and borders is not enough regarding accessibility, since you'd basically convey focus state with color only.

So, since we aim to enforce accessibility, we don't provide an easy way to drop focus styles.

@WinterSilence
Copy link
Contributor Author

WinterSilence commented Mar 22, 2021

@ffoodd

If you've read discussions you'd noticed adding such variable has been suggested already.

I don't found comments about new behavior variable. I don't want change behavior of $enable-shadows

aim to enforce accessibility

I don't understand you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants