Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 608c929 commit 01733c7Copy full SHA for 01733c7
03 - CSS Variables/app.js
@@ -0,0 +1,10 @@
1
+const inputs = document.querySelectorAll('.controls input');
2
+
3
+function handleUpdate() {
4
+ const suffix = this.dataset.sizing || '';
5
6
+ document.documentElement.style.setProperty(`--${this.name}`, this.value + suffix);
7
+}
8
9
+inputs.forEach(input => input.addEventListener('change', handleUpdate));
10
+inputs.forEach(input => input.addEventListener('mousemove', handleUpdate));
0 commit comments