Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
h4xx3r16966y@dontPanic yep, enabling functionality, which also does have to interact with styling, but to an extension.
But way too many times I've seen JavaScript used as a substitute to well thought CSS 😥
Just try by yourself with the JavaScript blocker add-on -
One reason why web devs are intentionally fucking this up is to deter people from using JS blockers - after all, JS is heavily used in user tracking and ad serving.
-
h4xx3r16966y@Fast-Nop That's just when it's intentional, and I can't imagine it being the majority of cases
-
@Fast-Nop hi webdev here.
There are a few reasons that webdevs don't use css:
1) preferring to keep things in one language reduces the level of problems you need to solve at times.
2) some people just don't like css. They avoid it like wildfire.
3) solving style scoping issues with js is sometimes easier than attaching a bunch of custom styles to various elements, especially when you are already working with a component-based library like vuejs or react (not to say that css selectors are mighty fun to write :) ) -
@gitoutofhere A webdev who can't deal with CSS should head for training, not for JS hacks.
-
@Fast-Nop but you do know that css-in-js is a big thing now. Also, solving scoping issues with styles is not a trivial task sometimes (I had to combine two pages once. One was using bootstrap 2.1 and the other was using bootstrap 3.4, if the styles were tied to the individual components as opposed to generic names like "col" "row" my life would have been so much easier), if you can just not deal with such issues by scoping the css to the elements, then why not?
-
@gitoutofhere of course you can override CSS in JS if the CSS is not with !important. But that's only the right thing to do if some styles actually depend on dynamic actions - not for bypassing a completely misdesigned style hierarchy.
-
musician6656ySome things are just easier with js than with css. You can do almost anything with css (look around codepen) but many of those cool things are just ugly css hacks which dont work on 50% of the browsers.
Also most of us webdevs dont have the luxury to use the newest css features.
As you said: css has never been so powerful as today. If only we could use this power instead of having to support crap like safari or ie -
h4xx3r16966y@musician lookup, Microsoft is going to develop it's next browser on top of chromium (🤮 for the choice)
-
musician6656y@h4xx3r well: goverments / banks / businesses wont care about that and will keep using ie since their software only runs on it..
-
h4xx3r16966y@musician until technical debt hits them hard and old developers are nowhere to be found 🙂
Related Rants
It's been long time that I use the JavaScript blocker add-on by default, and I pretty much get accustomed to see and perceive the web as broken styling trash for most of the times.
And this broken state(on non-SPA websites) isn't even justified because CSS has never been as powerful as nowadays. So... WTF?
On my side, I never let the absence of JavaScript ruin the template/style of a webpage u_u
rant
story