3 ms·
CSS has poor defaults, but you can't break backwards compatibility on the web. Check out this gist [0], which sets far more sensible defaults for flexbox. I too
by TheAceOfHearts 8y ago
CSS has poor defaults, but you can't break backwards compatibility on the web. Check out this gist [0], which sets far more sensible defaults for flexbox. I took it from css-layout, which was later renamed to yoga [1]. Everyone I've convinced to try it out has told me that they found it much more intuitive. It makes things work the way you'd expect them to!
I'd be genuinely interested in hearing about your experiences with other layout and styling languages or tools, and what you like about them. I used to hate on CSS a lot, but eventually changed my view and grew to like it, and I think given its history it's actually quite good. I haven't had much in-depth experience with native alternatives, but when I've tried em out I usually found they each have their own shortcomings. For example, on macOS I'd say Auto Layout is certainly easier when getting started, but as soon as you want to create your own components from scratch it becomes rather challenging.
As for styling a container based on what it contains, if you know of any examples which showcase good execution of this idea I'd also love to check em out. I know of at least two proposals / libraries which are attempts at tackling that problem in CSS; take a look at CSS-Element-Queries [2] and EQCSS [3].
[0] https://gist.github.com/cesarandreu/3e87cb6993bedeb162b5648222eb67bf https://gist.github.com/cesarandreu/3e87cb6993bedeb162b56482...
[1] https://github.com/facebook/yoga https://github.com/facebook/yoga
[2] http://marcj.github.io/css-element-queries/ http://marcj.github.io/css-element-queries/
[3] https://elementqueries.com/ https://elementqueries.com/
- wolfgke 8y ago> CSS has poor defaults, but you can't break backwards compatibility on the web. That is why we should create something new that does not have this legacy baggage: The W3C tried this with XHTML 2.0 > https://en.wikipedia.org/w/index.php?title=XHTML&oldid=837095486#XHTML_2.0 https://en.wikipedia.org/w/index.php?title=XHTML&oldid=83709... and it seems to have been much more elegant than HTML5: > http://www.informit.com/articles/article.aspx?p=1994793 http://www.informit.com/articles/article.aspx?p=1994793 > https://web.archive.org/web/20100611220044/http://immike.net/blog/2008/02/06/xhtml-2-vs-html-5/ https://web.archive.org/web/20100611220044/http://immike.net...
- donatj 8y agoGods I miss the dream of the semantic web. I can’t seem to convey why it’s ideals are important to the younger generation. They seemingly just want to build proprietary apps to make money. I wanted to build data sources to help the world. The death of semantic CSS still stings. I simply cannot stand the current state of just appending classes that don’t describe the data to style. It’s barely an improvement over using style attributes. The HTML should ideally have zero consideration for how it will look on the page and just describe the data within; admittedly that became something of CSSs failing though I believe a lot of that can be resolved with preprocessors to allow easier reuse.