bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

v5/docs: reintroduce `outline` for docs code samples, buttons when `:not(:focus-visible)`

Open patrickhlauke opened this issue 3 years ago • 8 comments

closes https://github.com/twbs/bootstrap/issues/36506

patrickhlauke avatar Jun 05 '22 15:06 patrickhlauke

Fixes the issues found in #36506 - need testing more thoroughly throughout though to check that the change to buttons.scss don't have any horrid side effects (though noting that this will be a notable change for keyboard users, as it will reenable the default focus indication in the browser for them, which I'd say is not a bad thing since we've long suffered contrast issues with those fancy button styles)

https://user-images.githubusercontent.com/895831/172059262-0d06623d-0523-4e14-9a45-9a07b25cdd00.mp4

patrickhlauke avatar Jun 05 '22 15:06 patrickhlauke

@mdo et al, any thoughts on this?

patrickhlauke avatar Jun 13 '22 21:06 patrickhlauke

any chance we could get this looked at @twbs/css-review @mdo ?

patrickhlauke avatar Jul 14 '22 00:07 patrickhlauke

Focus indication on <pre> code samples is now visible. Great!

Screenshot from 2022-07-24 08-48-26

Note: We should improve the rendering because the focus area is under the copy button


Regarding the buttons, the rendering on Chrome is good. On Firefox, however, the box shadow + red outline combination hurts the eyes a little bit. Maybe just because I'm not used to it yet.

Screenshot from 2022-07-24 08-56-43 Screenshot from 2022-07-24 09-16-25

Screenshot from 2022-07-24 08-58-27 Screenshot from 2022-07-24 08-59-12

Screenshot from 2022-07-24 09-00-12


Off-topic: while playing with the documentation, focus indication for carousels controls; not visible enough IMO.

julien-deramond avatar Jul 24 '22 07:07 julien-deramond

in Chrome, there seems to be a tiny bit of overlap as well ... i can have a look at nudging something by a few pixels to compensate.

image

in my Firefox/Win, it uses blue rather than red for some reason. maybe we should explicitly define the outline colour as well at some point (part of the larger reevaluation of focus/focus-visible styles perhaps)

image

patrickhlauke avatar Jul 24 '22 08:07 patrickhlauke

Let's do it step by step, no problem. In other PRs:

  • nudging something by a few pixels to compensate (if too complicated for this PR)
  • defining the outline colour to be coherent between browsers (part of the larger reevaluation of focus/focus-visible styles)

julien-deramond avatar Jul 24 '22 09:07 julien-deramond

I'll have a look at the subtle nudging now as part of this PR, so hold off merging until I had a crack at it

patrickhlauke avatar Jul 24 '22 09:07 patrickhlauke

Done...added an extra bit of explicit margin on the right-hand side of the pre.

In Firefox now:

image

In Chrome:

image

As said, leaving the outline color thing for another time (as it will likely need to be done on a section basis, so the outline will be a light colour in the header, and a dark one in the main section, etc)

So this PR is now ready for final review/merging

patrickhlauke avatar Jul 24 '22 11:07 patrickhlauke

@mdo et al, any news on this?

patrickhlauke avatar Aug 25 '22 19:08 patrickhlauke