cssinjs / cssinjs/jss

Improve DX by using DOM API for rendering

Open
#1,125 3 comments 8 reactions 0 assignees View on GitHub
enhancement important
Dominant language
JavaScript
Stars
7.1k
Forks
386
PR merge metrics
No merged PRs in 30d

Description

In cases where style rules are linked, we use CSSOM insertRule API. This happens automatically when using rule and value functions in react-jss or link:true option from the core.

Negative aspect of insertRule API is
1. It doesn't show up in chorome DOM inspector in the style tag content
1. It is not editable in style tab of devtools (one can still overwrite using inline styles)

Positive aspects of insertRule
1. It is very fast
1. It gives us references to CSS rules

To improve DX, we can use a slow way to render in DEV mode only over DOM API.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.