cssinjs / cssinjs/jss

[Feature Request] optional dev-mode styles validation and warnings about invalid styles

Open
#1,336 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
JavaScript
Stars
7.1k
Forks
386
PR merge metrics
No merged PRs in 30d

Description

__Is your feature request related to a problem? Please describe.__
As mentioned in #1334, I experienced confusing behavior because I had `animation: [...]`, and AFAICT arrays aren't supported for `animation`, which is my mistake; but the server-side styles accidentally turned out to work anyway, which really threw me for a loop.

__Describe the solution you'd like__
If I could make JSS warn about any invalid styles in dev mode, I think it would prevent me from wasting time on confusing problems like this in the future.

__Are you willing to implement it?__
Yup! As there are a lot of things that could be validated, let me know if you want to discuss an architecture for performing validation.

Contributor guide

Open the contributing guide

Research direction

Review issue #1334 and discuss the validation architecture before choosing a scope; the payload names no files, tests, or entry points. Done means JSS can warn in dev mode about invalid styles such as an array-valued animation while preserving supported server-side behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.