From 6d2c96b89348cbb48fb3d37a3c5d8e76d925bea7 Mon Sep 17 00:00:00 2001 From: anjju Date: Fri, 1 Aug 2025 11:26:53 +0530 Subject: [PATCH] chore: Update docs, resolves #4520 --- src/pages/elements/typography/code.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pages/elements/typography/code.mdx b/src/pages/elements/typography/code.mdx index cb66b16c816..d10eb489fee 100644 --- a/src/pages/elements/typography/code.mdx +++ b/src/pages/elements/typography/code.mdx @@ -45,7 +45,16 @@ You can use this package by writing the following: // Include utility classes for type-related properties @include type.type-classes(); +``` + +## How to style an element +Outside of very conscious exceptions, style all your fonts with the Carbon +helpers so you can easily keep your code robust and consistent. Avoid using +single CSS attributes like font-weight or font-size whenever possible and rather +defer the type handling to Carbon. + +```scss .selector { // Include a type style @include type.style('productive-heading-01');