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

fix: prevent unreadable text when using inline code with admonition headers #1603

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Conversation

pmargreff
Copy link
Contributor

@pmargreff pmargreff commented Sep 7, 2022

While navigating on ex_unit using Hex, I found some styling issues when using inline code inside admonition header blocks. Check the bottom of this page using dark mode. Not sure if it was added when adding support to admonition (#1400) or while removing less (#1597).

The problem happened when using inline code in admonition headers for some specific combinations, like the light theme and "errors" or the night theme and "warnings". Which would make the code to be too unreadable (gray font for the white background).

I'm following the same pattern for inline code that shows up in the admonition body, forcing the inline code tag color to be black. Examples of cases happening before and after the change above:

Before (light theme)

image

After (light theme)

image

Before (dark theme)

image

After (dark theme)

image


I'm almost sure these changes would require generating assets. But once mix build changes a lot of things, I am not confident about which generated files I should commit.

…eaders

* Some cases of using inline code in admonition headers like light theme
and errors or night theme and warnings would cause make the code be too
bland (gray) for the white background. Forcing the inline code tag color
black when showing in the admonition header seems to fix it.
@josevalim josevalim merged commit eb463ec into elixir-lang:main Sep 7, 2022
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@pmargreff pmargreff changed the title fix: prevent unreadable text when using inline code with admonition eaders fix: prevent unreadable text when using inline code with admonition headers Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants