Settings

Theme

Show HN: Descartes.js – Write CSS entirely in JavaScript and bypass the cascade

descartes.io

11 points by jonhmchan 10 years ago · 5 comments

Reader

teleclimber 10 years ago

On your page Descartes causes three forced reflows per scroll event, but no discernible visual effect apart from jank. Thanks, but I'll stick to CSS.

mchahn 10 years ago

I'll walk into an even bigger fire.

I encode all my css, html, and code in JS. I put the entire thing for each module in one page, but my modules are small and granular. I truly believe that separation of concerns does not apply. CSS/HTML/JS are all concerned with each other in a small module. Reading and writing the code becomes much easier and there isn't really any performance hit.

arunkumarl 10 years ago

Cool stuff. I was recently having this idea of putting my CSS in a JS file and inlining it when the page loads. Are you using it in any project? How maintainable is this?

jonhmchanOP 10 years ago

I know I'm walking right into the fire with this one.

SteSteSte 10 years ago

I don't even

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection