Skip to content

Code

This page lists CSS variables for Code blocks.

VariableDescription
--code-block-backgroundCode-block background color
--code-block-paddingCode-block padding
--code-block-radiusCode-block radius
--code-snippet-backgroundCode snippet background color
--code-snippet-paddingCode snippet padding
--code-snippet-radiusCode snippet radius

Tokens

You can enable code-highlighting by specifying the language when created a code-block.

VariableDescription
--token-attrColor for attributes, keywords, and important syntax elements
--token-propertyColor for CSS properties and constants
--token-selectorColor for class names, selectors, and important characters
--token-commentColor for comments, documentation, and metadata
--token-functionColor for function names, class names, and important syntax elements
--token-operatorColor for operators
--token-variableColor for variables, namespaces, and inserted elements
--token-punctuationColor for punctuation characters and separators