You can pass CSS custom properties — both static and dynamic — to components: ```svelte ``` > [!NOTE] Custom properties must be specified individually — you cannot pass them via [spread attributes](basic-markup#Spread-attributes). Inside the component, we can read these custom properties (and provide fallback values) using [`var(...)`](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties): ```svelte ``` You don't _have_ to specify the values directly on the component; as long as the custom properties are defined on a parent element, the component can use them. It's common to define custom properties on the `:root` element in a global stylesheet so that they apply to your entire application. ## How it works The above code essentially desugars to this: ```svelte ``` For an SVG element, it would use `` instead: ```svelte ``` > [!NOTE] While the extra element will not affect layout, it _will_ affect any CSS selectors that (for example) use the `>` combinator to target an element directly inside the component's container.