CSS3 or Javascript?
CSS3 or Javascript?
Hello, I would like to ask about using CSS3.. Apparently the CSS3 offers a lot of functions which can replace some js functions, like creating dropdown menus and hover tabs and so on. On the other, not everybody has newest version of browser. I am afraid that there still might be people to whose some important things like menus won't be shown or something. So my question is: what should I use? Thanks in advance.
- Jackolantern
- Posts: 10893
- Joined: Wed Jul 01, 2009 11:00 pm
Re: CSS3 or Javascript?
You're right that there are still far too many browsers who aren't supporting CSS3 correctly to use it for critical UI elements. So my advice is to use new CSS3 features for non-critical page elements that will degrade gracefully when they aren't supported. Perhaps just for some eye-candy. But use JS for critical UI elements, such as navigation menus, and things the user can't operate the page without.
The indelible lord of tl;dr
- a_bertrand
- Posts: 1537
- Joined: Mon Feb 25, 2013 1:46 pm
Re: CSS3 or Javascript?
Actually, ideally, your page should degrade to a non-javascript page too, as maybe some people will have it disabled. Same for images etc.
Do I do it? It depends, if it's for my own game, no, if you don't have canvas and js support you simply can forget about my game. For my professional development, yes, most of my interfaces works without any JS.
Do I do it? It depends, if it's for my own game, no, if you don't have canvas and js support you simply can forget about my game. For my professional development, yes, most of my interfaces works without any JS.
Creator of Dot World Maker
Mad programmer and annoying composer
Mad programmer and annoying composer
- Jackolantern
- Posts: 10893
- Joined: Wed Jul 01, 2009 11:00 pm
Re: CSS3 or Javascript?
True. But like you said, for my personal projects I don't worry about people who have JS disabled very much, since the site probably uses it at its core.
The indelible lord of tl;dr
- a_bertrand
- Posts: 1537
- Joined: Mon Feb 25, 2013 1:46 pm
Re: CSS3 or Javascript?
Then it's like my game => no JS then go away
Creator of Dot World Maker
Mad programmer and annoying composer
Mad programmer and annoying composer
- hallsofvallhalla
- Site Admin
- Posts: 12031
- Joined: Wed Apr 22, 2009 11:29 pm
Re: CSS3 or Javascript?
That is my life statement. No JS then go away
Re: CSS3 or Javascript?
Muhahaha I could live by that rule..
Re: CSS3 or Javascript?
I don't see why people would disable it anyway?
- a_bertrand
- Posts: 1537
- Joined: Mon Feb 25, 2013 1:46 pm
Re: CSS3 or Javascript?
Could be for security reasons or company policy. People even disabled cookies at some point.
Creator of Dot World Maker
Mad programmer and annoying composer
Mad programmer and annoying composer
- Jackolantern
- Posts: 10893
- Joined: Wed Jul 01, 2009 11:00 pm
Re: CSS3 or Javascript?
I think the days of home users knowingly disabling Javascript are nearing an end. Look around at the web today. Even Fortune 500 sites are building JS into their core experiences. It just doesn't seem like you could get a lot done without it.
Businesses, that is separate case. A lot of businesses know that their intranet sites will work without JS, and see disabling it company-wide as a way of crippling Facebook and other time sinks with an added security bonus.
Businesses, that is separate case. A lot of businesses know that their intranet sites will work without JS, and see disabling it company-wide as a way of crippling Facebook and other time sinks with an added security bonus.
The indelible lord of tl;dr