open-props icon indicating copy to clipboard operation
open-props copied to clipboard

normalize table hover colors

Open Crisfole opened this issue 11 months ago • 5 comments

Tables look NICE by default with styles/normalize setup:

image

Unfortunately they're totally illegible when you hover on them:

image

Color is dark:

image

And on hover the background is too:

image

I will add that my root stylesheet right now is:

@import "open-props/postcss/style";
@import "open-props/postcss/normalize";

body {
    --gap: var(--size-3);
    --header-width: calc(var(--size-header-3) + (2 * var(--gap)));
}

And oddly the app is still rendering in light mode. I was relying on open-props' @media (prefers-color-schema: light) to detect that I'm in dark mode on my machine, but it is not doing that.

Possible solutions:

  • Add color: var(--gray-1); to the dark background on hover.
  • Lighten the dark background in light mode to var(--gray-3) to dark consistent with light mode.
  • Make hover row-highlighting opt-in.

This also might secretly be a completely different bug: You're using it wrong, Chris. Here's why...I'm totally cool with that too.

Crisfole avatar Mar 22 '24 22:03 Crisfole

ATM I fixed it by not worrying about dark mode at all and adding

tr:hover td {
    background-color: var(--gray-3);
}

To my root stylesheet...but, I imagine something is off here.

Crisfole avatar Mar 22 '24 23:03 Crisfole

Not saying that this is definitely the issue, but you posted "@media (perfers-color-**schema**: light)"

schema with an 'a' instead of scheme

Also, do you think you could post a link to a minimal reproduction? And maybe your environment details as well? (OpenProps and normalize versions, browser + version, OS + version, etc)

I'm not seeing the issue on the Normalize CodePen demo on a Chromium browser on Mac.

Edit: Also just tested on Chromium and Firefox on Windows 11 with no issues.

https://github.com/argyleink/open-props/assets/29676413/b2e471c2-9727-4148-b5db-13d18834adfe

Brian-Pob avatar Mar 24 '24 07:03 Brian-Pob

was gonna ask for a minimal reproduction too (or go make one), but it's already covered here! thanks!

argyleink avatar Mar 25 '24 17:03 argyleink

I bet I know what's going on...Gimme five! This is almost certainly a PEBKAC error...

EDIT 1 minute later

Dear Reader, he did not in fact know.

I had thought I maybe had specifically set the background color to white on one section.

Crisfole avatar Apr 02 '24 00:04 Crisfole

hi guys, how can i addapt notmalize to read from a toffle button in the app ?

roycw avatar May 09 '24 15:05 roycw

@roycw inappropriate spot to ask this. Fresh issue, read the docs, poke the code, lots of legitimate ways to ask this. You've already asked the question in issue #499, if it's not getting the attention you want you ought to improve the question or check out the source of The Docs website

Crisfole avatar May 14 '24 13:05 Crisfole

Understood. For what its worth found some bugs in the themes. where colors are hardcoded Will ask in the approproate channels.

roycw avatar May 14 '24 13:05 roycw