# Locally Scoped CSS Variables: What, How, and Why

DevFeed: [Locally Scoped CSS Variables: What, How, and Why](<https://devfeed.tech/articles/locally-scoped-css-variables-what-how-and-why-28807.md>)

Original publisher: [Read original article](<https://una.im/local-css-vars/>)

Published: 2017-06-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Una Kravets](<https://devfeed.tech/sources/una-kravets.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [modern web development](<https://devfeed.tech/topics/modern-web-development.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [css](<https://devfeed.tech/tags/css.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [processors](<https://devfeed.tech/tags/processors.md>), [properties](<https://devfeed.tech/tags/properties.md>), [scope](<https://devfeed.tech/tags/scope.md>), [variables](<https://devfeed.tech/tags/variables.md>)

## AI overview

This article explains CSS custom properties, including how their dynamic values differ from variables compiled by Sass and PostCSS. It covers local scope, JavaScript integration, partial values within properties, and using variables to create cleaner component styles.

## Source excerpt

Leveraging CSS Variable scope improves the size, specificity, and semantics of our stylesheets. This article talks all about what CSS Variables are and how we can leverage scope to improve our styling.