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

RFC: change Docusaurus admonition warning color from red to yellow #7558

Closed
1 of 2 tasks
slorber opened this issue Jun 3, 2022 · 0 comments · Fixed by #9308
Closed
1 of 2 tasks

RFC: change Docusaurus admonition warning color from red to yellow #7558

slorber opened this issue Jun 3, 2022 · 0 comments · Fixed by #9308
Labels
better engineering Not a bug or feature request
Milestone

Comments

@slorber
Copy link
Collaborator

slorber commented Jun 3, 2022

Have you read the Contributing Guidelines on issues?

Motivation

This is what Docusaurus displays if you use :::warning

CleanShot 2022-06-03 at 17 08 35@2x

I believe it should be:

CleanShot 2022-06-03 at 17 11 01@2x


Note: Infima already uses alert--warning class for this yellow color.

Maybe this is a historical typo?

Most likely coming from our remark-admonition dependency:

https://github.com/elviswolcott/remark-admonitions/blob/master/lib/index.js#L31

  warning: {
    ifmClass: "danger",
    keyword: "warning",
    emoji: "🔥", //'🔥'
  },
  caution: {
    ifmClass: "warning",
    keyword: "caution",
    emoji: "⚠️", // '⚠️'
  }

All other doc tools use yellow for warnings:

v1.vuepress.vuejs.org/guide/markdown.html#custom-containers

nextra.vercel.app/themes/docs/callout

vitepress.vuejs.org/guide/markdown.html#custom-containers

docs.gitbook.com/editing-content/rich-content/with-command-palette#hints-and-callouts


The migration strategy remains to be defined: how do we avoid user site admonitions to move from red to yellow without them being aware of this change?

Important note: we don't even document :::warning, it is a historical alias/shortcut for :::caution which is how to use the yellow admonition color today.

Are there a lot of third-party sites using :::warning today?

:::caution is less natural to me: should we deprecate it in favor of a new first-class (not an alias) :::warning admonition key?

(although in practice there's not a clear difference of an alias vs a first class admonition key)

Related to #7556

Self-service

  • I'd be willing to do some initial work on this proposal myself.
@slorber slorber added proposal This issue is a proposal, usually non-trivial change status: needs triage This issue has not been triaged by maintainers labels Jun 3, 2022
@Josh-Cena Josh-Cena added better engineering Not a bug or feature request and removed proposal This issue is a proposal, usually non-trivial change status: needs triage This issue has not been triaged by maintainers labels Jun 3, 2022
@slorber slorber added this to the 3.0 milestone Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better engineering Not a bug or feature request
Projects
None yet
2 participants