rspress icon indicating copy to clipboard operation
rspress copied to clipboard

[Feature]: theme-default new mdx container color

Open sumy7 opened this issue 11 months ago β€’ 3 comments

What problem does this feature solve?

Currently, there are four types of container backgrounds: image among which the 'tip' and 'info' states share the same color - green.

This can sometimes lead to confusion as users may not be able to distinguish between 'tip' and 'info' states based on color alone. Therefore, I would like to propose the following changes:

  1. Introduce a new 'success' state that utilizes the green color. The 'success' state can be used to indicate successful operations or positive outcomes.
  2. Consider changing the colors for 'tip' and 'info' states to other distinct colors. This would help users to differentiate between the two states more easily.

Please considering this request, thx.

What does the proposed API look like?

::: success
a success block
:::

sumy7 avatar Mar 19 '24 02:03 sumy7

I think provide a success state is good idea, tip and info can be treated it as the same state.

10Derozan avatar Mar 19 '24 02:03 10Derozan

can it use blue color for β€œtip” and β€œinfo” state?

sumy7 avatar Mar 19 '24 04:03 sumy7

sure, but it may change the current docsite which is built by rspress.

10Derozan avatar Mar 19 '24 06:03 10Derozan

This is already implemented, see https://rspress.dev/guide/basic/use-mdx#custom-container.

Image

Timeless0911 avatar Jan 14 '25 07:01 Timeless0911