If you are given an opportunity to change 3 things in the current CSS standards, what would they be? Excited to hear what the community has to say. 🍻
Apart from the browser prefix nonsense (that has gone the way of the dodo in every newest version of browsers except Safari -- which since Google absconded with the talent to fork off Blink has begun to age like milk) most of my problems with CSS aren't actually with CSS itself...
My problems lie with the markup people apply it to, and certain broken methodologies... like the mere EXISTENCE of the <style> tag -- that needs to go. HTML needs to more clearly define
If there is ANY real place the CSS specification itself needs work, it's clearly defining the default state, and how elements should receive style. There is NOTHING more annoying on this than how certain elements react differently to the same style values across browsers... As others have mentioned, form elements are the greatest offender of this -- I still say that the spec should just come right out and say: All input except file, and textarea should behave as if they are inline-block. Type="file" and "select" should behave as if inline block, except that their side button collapses onto the wrapper's padding. -- END OF PROBLEM.
Second place would be that we STILL pretty much need resets or to waste time declaring margins and padding on everything.
There's a LOT of crap being added that's either needlessly overcomplicated for what it does (flex), utterly pointless if you have ANY huffing clue what you are doing (mixins), and goofy garbage that's basically the W3C throwing up it's shoulders and saying "fine, sleaze it out however you like" by adopting crap from the halfwit manure known as preprocessors.
Going hand in hand with how the W3C adopting WhatWG's train wreck of pointless redundancies and pissing on logical document structure from orbit that is HTML 5. To me, most of HTML 5 as a markup specification to me is the bleeding edge of 1997 thinking. It seems carefully crafted to meet the wants and "needs" of the mouth-breathers who still sleaze out HTML 3.2 and proprietary crap that wormed it's way into transitional, loaded with presentational methodology and zero accessibility... until recently they were able to slap 4 tranny atop it, now they get to wrap 5 lip-service around the same outdated outmoded idiocy and pat themselves on the back over how "modern' they are. HTML 5 sure as shine-ola wasn't designed for anyone who embraced logical document structure, separation of presentation from content, semantic markup, or even the entire reason 4 Strict existed in the first place!
There's a saying a dearly departed friend used to use: "CSS is only as good as the markup it is applied to" -- so between the train wreck of 1990's methodology that is HTML 5, mated to people not qualified to even be making websites diving for mouth-breathing asshattery like bootcrap, it's hardly a shock that people think CSS is "hard" or "wrong" and end up wasting several hundred K of scripttardery and stylesheets on doing a couple dozen K's job!
But then, I still say for the majority of websites if you have ANY clue what you are doing -- NOT counting content or social media scripts -- there is ZERO legitimate excuse to have more than 72k of HTML+CSS+Scripting, spanning THREE files. Realistically there is NO reason for an entire CMS of ALL pages to break 48k of CSS, and in most cases you should be using half that!
Naturally though with people using presentational classes thanks to the OOCSS idiocy, starting out with "frameworks" that by themselves are two to five times the size of what the page "needs", and most sites these days being garbage copypasta -- such concepts are utterly lost in the shuffle. THEN these same sleazy ignorant fools try to tell us that their ignorant rubbish -- that results in writing two or three times the needed markup and twice the CSS BEFORE you even count the size of their stupid framework against it --- is somehow magically EASIER?
BULL-FREAKING-!!!!
It's mind boggling to see how people are so easily programmable. Almost none of the respondents objected in a slightest way, and just listed 3 items as asked. Watta boy! I bet you guys had hard time to choose from a relatively longer lists of yours, even squashed few items into one? Doh.
Most of the things I "hate" were already mentioned by others:
Flexbox already fixed the biggest issue I had with CSS and that was the complexity associated with building simple box-based layouts. There are still things that can be made simpler - things that are used every day.
Standards standards and standards - thing are a lot better these days compared to the IE6 days where IE6 didn't even follow the standard BOX model (see here for more info), but you still have browser specific prefixes which are annoying.
Arithmetic would be nice to have, for example, if I say height: 100% - 10px, I want my div to be 100% parent div minus 10 pixels for example. Some other things I'd like to see as well is height: 100% x screenheight - 10px, currently it's quite a mission make use of %-based heights.
Things I hate are.. Basically everything that needs a UI hack right now. It's sad that we still have to resort to plugins or hacks to do many simple things(like clearing floats or styling scrollbars).
3 things that I would like to be enhanced in CSS would be..
@apply rule)Add Variables, Mixins and the possibility to write new rules into existing rules. Well... I like Scss and hate to transform it to "plain" CSS before deployment.
Kevin Wolf
Full Stack Developer
Front End Designer
Just checked it. it's basically a PostCSS plugin. I would like it if vanilla/native CSS could do without pre/post processors as much as possible. :)
Maximilian Berkmann
Web and programming
As most people already mentioned:
Vendor prefixes which shouldn't even exist as using their non-prefix version should work for all the browsers.
Having to use SASS/LESS or any other SCSS libraries to do stuff that should be possible within the native CSS even if a new version should come to support this.
More control over forms, scrollbars.
Removing all the bullcrap that IE impose to be able to render the CSS well enough like "!important".