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

Add focus style for checkboxes and radios #28959

Closed

Conversation

alienlebarge
Copy link
Contributor

@alienlebarge alienlebarge commented Jun 25, 2019

Add focus style for default checkboxes and radios

#28957

@alienlebarge alienlebarge requested a review from a team as a code owner June 25, 2019 13:23
@mdo mdo added the on-hold label Jun 25, 2019
@patrickhlauke
Copy link
Member

patrickhlauke commented Jun 26, 2019

I'm in favor of this, although note that it's not always 100% perfect in, say, Chrome

with the new styles

but then, neither is Chrome's default

default chrome outline on radio buttons

(and yes, with this PR, it's more consistent in other browsers like Firefox and IE11)

@patrickhlauke
Copy link
Member

@mdo if you're not planning to have these styles for v5 (though I'm not sure I understand why/what the rationale is), then at least this can be backported to v4 though

@patrickhlauke patrickhlauke changed the base branch from master to v4-dev-xmr June 26, 2019 17:05
@patrickhlauke patrickhlauke requested a review from a team as a code owner June 26, 2019 17:05
@patrickhlauke patrickhlauke changed the base branch from v4-dev-xmr to master June 26, 2019 17:06
@patrickhlauke
Copy link
Member

urgh ok, so changing base just to v4 made this PR super-ugly...in which case (as we'd want this still in v4 i'd say) would you mind closing this one and starting a fresh PR targeting v4-dev? sorry about the to-ing and fro-ing

@XhmikosR
Copy link
Member

We can rebase it if needed.

@MartijnCuppens
Copy link
Member

@alienlebarge,
Could you clarify what these lines are for:

bootstrap/scss/_forms.scss

Lines 222 to 224 in cf52170

color: $input-focus-color; // only needed for fallback to text input
background-color: $input-focus-bg;
border-color: $input-focus-border-color;

@patrickhlauke
Copy link
Member

patrickhlauke commented Jun 27, 2019

i think a more concise way may be to just add the mixin, without even needing to replicate the :focus block manually here

@include form-control-focus($ignore-warning: true);

(while yes, the mixin probably has a few redundant rules for checkboxes/radio buttons, at least it keeps it all tight and consistent for form control focus styles in general - if they ever need changing, it's only one place where the change needs to be made)

@patrickhlauke patrickhlauke removed the request for review from a team June 27, 2019 10:42
@alienlebarge
Copy link
Contributor Author

alienlebarge commented Jun 27, 2019

@MartijnCuppens

@alienlebarge,
Could you clarify what these lines are for:

bootstrap/scss/_forms.scss

Lines 222 to 224 in cf52170

color: $input-focus-color; // only needed for fallback to text input
background-color: $input-focus-bg;
border-color: $input-focus-border-color;

I have simply use the code of the @include form-control-focus($ignore-warning: true); mixin but since it will be deprecated (#28262), I havn't use the mixin itself.

As @patrickhlauke propose, it could be better to use it and it will be refactor when removed

@patrickhlauke

urgh ok, so changing base just to v4 made this PR super-ugly...in which case (as we'd want this still in v4 i'd say) would you mind closing this one and starting a fresh PR targeting v4-dev? sorry about the to-ing and fro-ing

Do you still want a PR targeting v4-dev?

@patrickhlauke
Copy link
Member

@alienlebarge sorry for all the to-ing and fro-ing, and yes there's lots of moving parts now that we've got v5 but still maintaining some parts of v4 etc...

if you don't mind, simplest would probably be to close this, make a new PR just with the mixin inclusion, and target v4-dev

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

Successfully merging this pull request may close these issues.

5 participants