mattdesl / mattdesl/dom-css

setting css variables

Open
#14 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
152
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Hi @mattdesl!

Setting element style as `el.style[property] = value` is not valid for css variables, so `css(el, {'--active': 'red'});` does not work for now.
We have to use `el.style.setProperty(property, value);` in order to enable custom css properties.
I guess that would be nice of dom-css to care about that.
Is it worth PR or that is out of package scope?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the implementation behind the `css(el, properties)` entry point and inspect how each property is assigned to `el.style`. Verify handling for a custom property such as `--active`; done means `css(el, {'--active': 'red'})` applies the CSS variable correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.