BrazilJS

Share this post
JSON no CSS
www.braziljs.org

JSON no CSS

Pode parecer estranho, e é mesmo, mas Jonathan Neal publicou o “hack” que permite colocar JSON no CSS.

BrazilJS
Jun 1, 2021
1
Share this post
JSON no CSS
www.braziljs.org

Pode parecer estranho, e é mesmo, mas Jonathan Neal publicou o “hack” que permite colocar JSON no CSS.
Em um post no CSS Tricks, Chris Coyer replicou a ideia.

-- {
--: {
"css": true,
"totally": {
"not": "controversial!"
}
}
}
#cool {
font-size: 10px;
}
view raw css-json.css hosted with ❤ by GitHub

Chris comenta que talvez a técnica não seja tão útil, mas lembra do fato de que algumas aplicações ainda utilizam JSONP, por conta do CORS, e então o hack poderia até ajudar.

Veja outros exemplos de usos alternativos e subversões no CSS no post: https://css-tricks.com/json-in-css/

Share this post
JSON no CSS
www.braziljs.org
Comments

Create your profile

0 subscriptions will be displayed on your profile (edit)

Skip for now

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.

TopNewCommunity

No posts

Ready for more?

© 2022 BrazilJS
Privacy ∙ Terms ∙ Collection notice
Publish on Substack Get the app
Substack is the home for great writing