Live data from Hacker News

JSON stylesheets - screw CSS frameworks, use JavaScript - JSSS

maraksquires.com

1–10 of 36 posts

Re: JSON stylesheets - screw CSS frameworks, use JavaScript - JSSS

#3
post #2

(1) CSS frameworks work whether or not client disable Javascript. (2) Many of the problems this article's thesis lays out with CSS are solveable server-side, by preprocessing CSS.

as the article states, "CSS frameworks (haml, sass, less) are meant for server-side templating and we need client-side templating."

this is intended for client-side templating and dynamically assigning CSS classes and properties at run-time.

:-)

Re: JSON stylesheets - screw CSS frameworks, use JavaScript - JSSS

#4
post #2

(1) CSS frameworks work whether or not client disable Javascript. (2) Many of the problems this article's thesis lays out with CSS are solveable server-side, by preprocessing CSS.

as the article states, "CSS frameworks (haml, sass, less) are meant for server-side templating and we need client-side templating." this is intended for client-side templating and dynamically assigning CSS classes and properties at run-time. :-)

That reasoning is kind of circular, isn't it? Why do you need client-side stylesheet dynamism?

Re: JSON stylesheets - screw CSS frameworks, use JavaScript - JSSS

#5
post #2

(1) CSS frameworks work whether or not client disable Javascript. (2) Many of the problems this article's thesis lays out with CSS are solveable server-side, by preprocessing CSS.

The page does seem to be missing a "disadvantages of JSSS" section.

Re: JSON stylesheets - screw CSS frameworks, use JavaScript - JSSS

#6
post #5
post #2

(1) CSS frameworks work whether or not client disable Javascript. (2) Many of the problems this article's thesis lays out with CSS are solveable server-side, by preprocessing CSS.

The page does seem to be missing a "disadvantages of JSSS" section.

if used in conjunction with a traditional CSS framework and you require javascript for your page, there are really no dis-advantages.

in my rich internet applications i will use traditional CSS for the initial "base" state of the application and then JSSS for all further states which are generated via JS (no page-reload)

Re: JSON stylesheets - screw CSS frameworks, use JavaScript - JSSS

#8

This will be SLOW. Also not having vars in CSS is a blessing in disguise: otherwise business logic would be built into the stylesheet by some genius and I would Auvergne to support it. No thanks.

1. jQuery and sizzle are pretty fucking fast

2. if you cant separate your business logic from your views....you have bigger problems to deal with....

Re: JSON stylesheets - screw CSS frameworks, use JavaScript - JSSS

#9
post #5

Earlier quoted context omitted.

The page does seem to be missing a "disadvantages of JSSS" section.

if used in conjunction with a traditional CSS framework and you require javascript for your page, there are really no dis-advantages. in my rich internet applications i will use traditional CSS for the initial "base" state of the application and then JSSS for all further states which are generated via JS (no page-reload)

one big drawback I'm seeing is binding styles directly to DOM elements (it will appear as style attribute).

this definitely has memory (many non-shared styles) and performance implications (may cause many reflows because you are setting styles individually) and it may interfere with existing code

I would expect this tool to generate real CSS stylesheet code and embed it into page dynamically

Re: JSON stylesheets - screw CSS frameworks, use JavaScript - JSSS

#10
post #2

(1) CSS frameworks work whether or not client disable Javascript. (2) Many of the problems this article's thesis lays out with CSS are solveable server-side, by preprocessing CSS.

"CSS frameworks work whether or not client disable Javascript."

I've been thinking about this a lot lately and I'm not sure it's that big a concern anymore.

I did a test one day and tried to get through a day with Javascript disabled and I came to the conclusion the web simply isn't usable that way. Because these days even the simple sites require Javascript because tools like dreamweaver embed javascript for menus and other basic animations.

Post reply on HN