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

V5 btn-light/btn-black hover and normal colours too close #34123

Closed
iustin opened this issue May 27, 2021 · 5 comments · Fixed by #36168
Closed

V5 btn-light/btn-black hover and normal colours too close #34123

iustin opened this issue May 27, 2021 · 5 comments · Fixed by #36168
Labels

Comments

@iustin
Copy link

iustin commented May 27, 2021

I'm not familiar with Bootstrap's color schemes/utilities to debug this, but from what I see, btn-light and btn-black have too "close" normal and hover colours:

  • btn-light: v4 #f8f9fa with hover #e2e6ea, v5 #f8f9fa with hover #f9fafb
  • btn-dark: v4 #343a40 with hover #23272b, v5 #212529 with hover #1c1f23

Using an online calculator, btn-light in v4 has a delta-E of ~7, wheras v5 has a delta-E of only 0.34, which means it's practically invisible.

In practice this can be seen by hovering in the v4 docs vs. v5 docs, or thanks to helpful github rendering inline here (although the circles are too small to be clearly visible, but it is).

Is this intentional?

@ffoodd
Copy link
Member

ffoodd commented May 27, 2021

Probably, but that's still good to improve :)

@ffoodd
Copy link
Member

ffoodd commented May 27, 2021

FWIW it's because we check if background color should be light or dark (to contrast with foreground color) and apply either tint() or shade() on hover. Basically our dark and light backgrounds or too close to black and white, so that tint() and shade() aren't very effective.

iustin added a commit to iustin/corydalis that referenced this issue May 28, 2021
Sigh, this seems like a downgrade in many cases. Problems:

- change from column groups (CSS-based) to masonry (JS-based) is
  dynamic and leads to page reflow on reload, or changing to next
  image, so for now keep it enable for homepage but disable it for
  image info page.
- the text light/dark are not readable enough on hover, filled this as
  twbs/bootstrap#34123 and will change later.
- the change from `.close` to `.btn-close` also means changing from
  text (`×`) to SVG icon, which is (for me) urgh.
- buttons in form labels give priority to button theming, not form
  label theming; changed search top-bar button to `.btn-secondary` due
  to this.

So, doing this for the times, not for "oh it's so much nicer". Anyway…

Changes:

- fixed `.card > .table` double-borders; v4 had border on top (which
  was merged almost perfectly with `.card-header`), v5 has it on the
  bottom, where it's so obvious, so fixed that;
- tweaked `navbar`s and `alert`s as needed;
- changed from left/right to start/end for a number of classes;
- tweaked a number of grid sizing for better flow; these would apply
  to v4 too, likely.

Closes #6.
@mdo
Copy link
Member

mdo commented Apr 14, 2022

See #36168 for a potential solution.

@mdo mdo closed this as completed in #36168 Jun 8, 2022
@fitcwill
Copy link

fitcwill commented Jul 22, 2022

Noticed this was resolved in 5.2.0 but when applying the update to take advantage of this I noticed that the rounded corners changed so they don't appear so nicely when inside a card (the rounded corner is different to the rounded corner of the card)

image

image

Sorry it's a tiny thing... but thought worthy of mention nevertheless. Easily missed and possibly even by design for someone in the know.

@mdo
Copy link
Member

mdo commented Jul 22, 2022

@fitcwill This was mentioned in our blog posts. Was an intentional design update :).

@twbs twbs locked and limited conversation to collaborators Jul 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants