elixirschool / school_house

The new era of Elixir School now powered by @phoenixframework
https://elixirschool.com/
Apache License 2.0
155 stars 49 forks source link

patch: make markdown code more contrast #200

Closed Rastopyr closed 2 years ago

Rastopyr commented 2 years ago

In dark theme some code in snippets is unreadable. It's usualy relate to some bash scripts.

Example of unreadable snippet:

image

I guess, with white color of text this snippets read much more comfortable.

image

So as i can check, it shouldn't affect any other usage of 'code' snippets.

jaimeiniesta commented 2 years ago

Thanks, from the Rocket Validator reports we can see that the dark mode has more contrast issues than the light mode, and those seem to come from the code blocks:

https://rocketvalidator.com/s/f03eb39f-688a-43ec-a208-8a36701421c4/v/19494694

jaimeiniesta commented 2 years ago

LGTM but I'm not sure if instead of using colors.white this should go through a theme like the other colors.

Rastopyr commented 2 years ago

@jaimeiniesta you mean pass it through theme decorator?

i just saw how white colors used in other color blocks, like here: https://github.com/elixirschool/school_house/blob/c6cd9be6aaa1b4bf2d4843b3d45bbbd7e5ec527f/assets/tailwind.config.js#L164

It used withiout decoration by theme.

kinson commented 2 years ago

I was curious why this regressed, and it looks like that happened in a pr a couple months ago here

https://github.com/elixirschool/school_house/pull/188/files#diff-52a43e64271620d979d25d597733b7930e6f3771ab30e71ec459bff2398e43dbL159-L161

It looks like it was even merged without the suggestion here 😬

https://github.com/elixirschool/school_house/pull/188#pullrequestreview-903961593