---
title: "CSS variables but with a dash of JavaScript ✨"
url: https://daily.dev/posts/css-variables-but-with-a-dash-of-javascript--vhcg6ziad
source_url: https://daily.dev/posts/css-variables-but-with-a-dash-of-javascript
type: article
source: "daily.dev"
published: 2020-11-06T09:05:19.600Z
updated: 2021-10-07T14:17:10.317Z
tags: ["javascript", "css"]
upvotes: 13
comments: 3
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CSS variables but with a dash of JavaScript ✨

**[daily.dev](https://daily.dev/sources/daily)** · 13 upvotes · 3 comments

## Summary

CSS Custom Properties or CSS Variables allows us to store a value stored in one place, then referenced in multiple other places. This is useful not only because they can be used at multiple instances and makes editing the values easy but also, it makes the properties easier to read when referring to it later.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://daily.dev/posts/css-variables-but-with-a-dash-of-javascript>

## Community discussion

Top comments from developers on daily.dev.

**@ghost** · 1 upvotes

> Here's a summary of sub-topics:
>
>
> 1. Quick note on CSS variables 📝
> 2. Introducing JavaScript ✨
> 3. Using event listeners 👂
> 4. More resources 🤩
>
>
> Thanks to everyone who read it :)

**@rahxul** · 0 upvotes

> This post is just like Pizza with extra spice

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/css-variables-but-with-a-dash-of-javascript--vhcg6ziad)
