Live data from Hacker News

You might not need JavaScript

youmightnotneedjs.com

21–30 of 254 posts

Re: You might not need JavaScript

#23
post #16

Another point of view: an exceptional article by Jenn Schiffer "A Call For Web Developers To Deprecate Their CSS" https://medium.com/cool-code-pal/a-call-for-web-developers-t... - HN Submit here https://news.ycombinator.com/item?id=12691081

Surely that's a parody. If it's not...

I clearly is.

Note the absurd metric (lines and spaces) to justify how the blown-up version is considered to be smaller. Also note that the article consequently talks about "Node code" even though they are talking about client-side JavaScript.

From the article:

    #gulp { 
        color : #0000ff;
        padding : 10px; 
    }

    This CSS takes up 4 lines, and at least 13 spaces. [...]

    document.getElementById(‘gulp’).style.color=‘#00f’;
    document.getElementById(‘gulp’).style.padding=‘10px’;

    This Node code takes up only 2 lines and there are 0 spaces.
    Essentially, we are saving lines, spaces, and files (delete
    your .css documents!).

Re: You might not need JavaScript

#25
post #11

Since half the examples do not work on Safari, I believe the title is a bit misleading.

Safari is the new IE6, stop supporting it and let it die. It will not get any better anyway. If most of your users are on iOS, then make an app for them, it's what Apple also want you to do...

Re: You might not need JavaScript

#26
Or, you could use JavaScript and do something in 30 seconds rather than fiddling with CSS.

Why do people try so hard not to use tools that make their life easier?

You might not need a car - you can walk. But it makes life easier and it just works!

Re: You might not need JavaScript

#27
post #5

It's sad that this site uses SCSS for displaying the rules, I'm using it in production and fully understand it, but it's needlessly abstracting the rules for the sake of a few extra words in each declaration. That aside, these are some pretty cool examples. Are there ways of doing this with CSS which doesn't screw with my browser back button?

I absolutely agree! While we can discuss about why SCSS is better, it is more like comparing Volvo with Mercedes. In the end, CSS is the standard, not SCSS. And CSS is evolving and getting better and better.

Re: You might not need JavaScript

#29
post #26

Or, you could use JavaScript and do something in 30 seconds rather than fiddling with CSS. Why do people try so hard not to use tools that make their life easier? You might not need a car - you can walk. But it makes life easier and it just works!

> Or, you could use JavaScript and do something in 30 seconds rather than fiddling with CSS.

Assuming you're more proficient in JS than CSS ;) With CSS3 I find some animation is easier w/ transitions and keyframes than JS.

Post reply on HN