carbon-website icon indicating copy to clipboard operation
carbon-website copied to clipboard

docs(Theme): update Theme docs with new guidance/usage

Open dakahn opened this issue 2 years ago • 1 comments

partially closes #11293

Updates the /code page for Themes with new usage/guidance clarity based on some support work we've done

dakahn avatar Jun 16 '22 22:06 dakahn

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
carbondesignsystem ✅ Ready (Inspect) Visit Preview Sep 26, 2022 at 0:49AM (UTC)

vercel[bot] avatar Jun 16 '22 22:06 vercel[bot]

I've totally overhauled this one with a bunch of theme related changes. Please re-review and let me know what you think.

tay1orjones avatar Sep 21 '22 19:09 tay1orjones

Changes look good to me!

Since you say

If you're using @carbon/react there's no reason to install the themes package separately. See our Carbon React guide to start

does that mean in the examples, you can just do @use '@carbon/themes and only have @carbon/react installed?

tw15egan avatar Sep 22 '22 16:09 tw15egan

@tw15egan No! Good distinction. In this case it means that instead of having @carbon/themes installed and doing:

@use '@carbon/themes/scss/theme';

You can instead access this stuff from @carbon/react

@use '@carbon/react/scss/theme';

This is limited to just the styles as well. If someone's wanting to get the exports for usage in javascript, they'll need to install the @carbon/themes package.

I'll update this verbiage to say "you likely don't need to install the themes package" instead of "there's no reason to install the themes package"

tay1orjones avatar Sep 23 '22 19:09 tay1orjones