1117 points · by bbx · 10y ago · 122 comments
A) How has the web been around for this long and nobody has done this before, i.e. there isn't at least some kind of authoritative reference like this?
B) Having worked with many UI/layout paradigms, and full aware of the fact that none of them are very good - css is indeed perhaps the worst. It takes quite a lot of abstraction on top of it to make sense of it.
But it's what we have - so good work.
* Index of CSS Properties by W3C https://www.w3.org/Style/CSS/all-properties.en.html
* CSS Reference by Mozilla Developer Network https://developer.mozilla.org/en/docs/Web/CSS/Reference
* CSS Reference by Tympanus http://tympanus.net/codrops/css_reference/
* CSS Almanac by CSS-Tricks https://css-tricks.com/almanac/
Even MDN, which is probably the closest thing to 'standard' has very few examples, missing definitions, nothing interactive.
W3C is only really the basic stuff.
Let's face it: the tool we all use for showing our stuff to the world basically has no documentation. It's a mess.
The Mac/Safari documentation is literally blank for tons of objects. I mean - $100B billion in the bank and they can't make docs. Even swift documentation is totally lacking in examples and hard to read (they're still depending on your ability to read Objective-C stuff).
Would be particularly nice to have a direct link to edit every particular property on its section, e. g. https://github.com/jgthms/css-reference/edit/master/property...
They are supported in all self-updating browsers, so unless you have to support IE<=10 they are safe to use and extremely convenient. Replacing a classic grid-based layout with flexbox saves an astonishing amount of markup. I've been using it exclusively for the last six months or so.
I found this CSSTricks article helpful when I was building my first flexbox layouts: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Most browsers are OK these days, but IE/Edge is where I've encountered the most problems with compatability. There are ways to work around it, but that takes a bit of additional effort. CSS tools, e.g., Autoprefix are useful.
My comment with browsers, is more about knowing your audience. Most of the evergreen browsers do support flexbox but...
Well, I maintain a website for a company.
97.3% of visitors, are return visitors.
69.77% of the visitors are using a version of Internet Explorer.
69.03% of the visitors are using Internet Explorer 7.0.
I have no hope of getting to use flexbox to simplify managing the website, which makes me very sad.
However, that said, the majority of components I build are still not in flexbox. It's a useful tool in the toolset, but not sure I'd call it the new default yet.
- https://css-tricks.com/almanac/ - http://tympanus.net/codrops/css_reference/
For those from React world, there is really awesome component, for rendering large sets of data: https://github.com/bvaughn/react-virtualized.
And why should it render all examples on one page?
They could have a static page for every property so one could link to http://cssreference.io/align-content instead of http://cssreference.io/#align-content and get just that static page. That should be pretty quick, especially with long caching of all other resources than the actual page content.
There's lots of different ways to have done it without having to do it all at once.
Or, would have complained that it was stupid to actually use an anchor tag to link to god forbid another complete page load.
Or, if they used a javascript framework to make deep links someone would have complained that they used a javascript framework for a static page, or even maybe they used the wrong JavaScript framework.
No it shouldn't. Split up large chunks if it impacts performance.
Very lazy on the part of the developer to code it that way.
Thanks for the report. Hopefully the author will almost fix it.
You should consider serving a separate page for each property in addition to one big list. This would be more useful for quick Google lookups.
Changes daily. More work to keep that accurate than to make the page in the first place :(
My other wish to really really learn CSS.... A list of CSS problems to solve ala project Euler. You get a visual example and you have to make it look identical. Then you get to see other solutions for the same problem.
This online book was helpful for me: http://book.mixu.net/css/
But for actual coding people would still Google for css-tricks or stackoverflow because Googling is faster than opening this website and searching.
Ace work on the site!
I would request/suggest an option to have one-per-page display of attributes - currently there's a lot of scrolling if you want to move between things.
Great site though.
Minor bug (?): your lorem ipsum is showing when viewing via http://hn.premii.com/
PS. Note to everyone - whitelist this in your ad blocker as author asks you to do!
How does it compare to table HTML vs. div HTML?
What are the benefits vs. div HTML & Bootstrap .. is it just the new thing to learn?
Flexbox is supported in:
* Internet Explorer 11, but only partially
* Edge 14+
* Firefox 52+ (Everything but buttons in Firefox 50)
* Chrome 51+ (50 had it, but had a bug that still plagues Safari)
* Safari 9.1 (but Safari has a couple huge bugs [1][2])
* Opera 41+
* Safari iOS 9.3+ (but see [1] & [2])
* Every version of Opera mini
* Android Browser 4.4+
* Android Chrome 53+
A great bullet-point list of why not to use tables for layout can be found here [3].
Flexbox is designed to enhance and make easier some of the CSS that we already use today, so they go hand in hand.
As to Bootstrap, as of v4, it will include Flexbox as an opt-in option (in case you support old browsers where it wouldn't work). [4]
[0] http://caniuse.com/#search=flexbox
[1] https://bugs.webkit.org/show_bug.cgi?id=136041
[2] https://bugs.webkit.org/show_bug.cgi?id=137730
[3] http://phrogz.net/css/WhyTablesAreBadForLayout.html
[4] http://v4-alpha.getbootstrap.com/getting-started/flexbox/
For me CSS has been largely very unintuitive, and part of that has been because of the adversarial evolutionary race of browsers.