NixOS / nixos-homepage

Sources for nixos.org
https://nixos.org
302 stars 315 forks source link

Notes in the manual are visually equivalent to code blocks #972

Open roberth opened 1 year ago

roberth commented 1 year ago

Describe the glitch

Code blocks are supportive and can be skipped when scanning through a section, but info blocks look almost identical and should not be skipped when scanning.

I'd like for notes to have the same (white) background, similar to the main text, but only slightly demarcated by a border and/or indentation; perhaps an info icon.

Example: the note about recursion, in https://nixos.org/manual/nixos/stable/index.html#sec-freeform-modules

Screenshots

image

Additional context Add any other context about the problem here.

fricklerhandwerk commented 1 year ago

@Yukiisbored would you be interested in tackling this?

timfenney commented 1 year ago

What colors are available? I noticed on the homepage the Web Vitals score is lowered due to low contrast. Looks like some colors may need rework in general?

roberth commented 1 year ago

That seems very true, but also solving one issue at a time is ok or often even preferable.

timfenney commented 1 year ago

@fricklerhandwerk should this be moved to the nixpkgs repo?

fricklerhandwerk commented 1 year ago

I don't think so. Not sure, but I presume the style is applied in the site build, using the ominous style repository... I don't have the capacity to deal with it and really hope that @lucperkins will make progress with rewriting the setup to be maintainable.

timfenney commented 1 year ago

Yeah I found the styles, I wonder if something like this is ok in the meantime?

We have a green colour, but I found no light green:

Screenshot from 2023-02-07 18-40-55

timfenney commented 1 year ago

@fricklerhandwerk do you have some guidance? I found there is a light orange colour for I think warnings.

I only saw green, blue, and orange in the site. There isn't a lot of contrast between the 2 boxes, so we could go with something completely different, like styling the code box darker and restyling the text to lighter colours to maintain the contrast between the box and the text. It would likely have to be darker than the Buttons on the Home page since their contrast is too low.

fricklerhandwerk commented 1 year ago

Dark background for the code blocks sounds good to me. De-messing the style setup would be worthwhile though. When I spent some time understanding how all of that works I failed miserably. To make the front end contributor friendly it needs to be much, much less clever. I'd even go as far as avoiding CSS preprocessing.