cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.07k stars 397 forks source link

"Core JSON syntax" expression in the docs is confusing #931

Closed mvasin closed 5 years ago

mvasin commented 5 years ago

There is a section in the docs titled "Core JSON syntax". This sounds really weird to me, as it includes functions, string interpolations and all the other too-wild-to-be-a-JSON perks.

Why is it called "JSON syntax" in the first place? My guess is it's meant to distinguish from string literal syntax, and has nothing to do with JSON. If so, can we call it "object syntax" so people don't expect JSON limitations (like double quotes instead of single quotes and so on)?

kof commented 5 years ago

Yep, I am working right now on changing the overall structure and already changed JSON syntax to "Objects based styles syntax". JSON Syntax was used in the older versions before function values.

String interpolations are provided by a plugin though, not in the core, so not sure where you got this.

kof commented 5 years ago

follow this issue #932 and this PR https://github.com/cssinjs/jss/pull/929 in case you have more input