2 ms·
CSS multicolumn layout is four years old. It's implemented in all the major browser engines, and many popular sites like Wikipedia use it. http://www.w3.org/TR/
by pcwalton 12y ago
CSS multicolumn layout is four years old. It's implemented in all the major browser engines, and many popular sites like Wikipedia use it. http://www.w3.org/TR/css3-multicol/ http://www.w3.org/TR/css3-multicol/
- rsanek 12y agoOnly partially. You usually have to use browser prefixes to get it to function. http://caniuse.com/#feat=multicolumn http://caniuse.com/#feat=multicolumn
- nailer 12y agoAdd Autoprefoxer in your build process and never type them again.
- yoran 12y agoOr use Bourbon mixins (http://bourbon.io/docs/ http://bourbon.io/docs/) if you use SASS.
- nailer 12y agoSASS mixins are great, but Autoprefixer is better for prefixes: it looks the same as writing actual CSS (just with no prefixes) and has no cognitive overhead during editing. Compare the Bourbon mixin: @include background(linear-gradient(red, green) left repeat); to autoprefixer: background: linear-gradient(red, green) left repeat;
- nothrabannosir 12y agoThat is not CSS anymore, it's "CSS + autoprefixer". Which, I agree, is great, but it's worth mentioning. Vanilla CSS requires the prefixes, "CSS + autoprefixer" doesn't, but it requires other things like an extra build step (and a build process, at all). Worse, it could be mutually exclusive with other tools. When you advocate an add-on to an existing solution, you're changing the solution. It's like people who recommend typescript in reply to JS's lack of types, or Coffeescript to its ugly syntax: you can't have both, they change the original thing. Or vimperator with firefox, or vim-mode emacs, or... it's all not the same thing anymore. You push the carpet down in one place, it comes up in another. CSS still requires the vendor prefixes. If autoprefixer is the perfect solution to that, let's stop people everywhere from using vanilla CSS and switch them over to "CSS + autoprefixer". Turns out it's not that easy, which gives the original "but it requires prefixes" argument more meat.
- nonplus 12y agoThat's not a solution; that's a workaround.
- tedunangst 12y agoLike I said, "working". I don't want two columns stretching ten feet long. I want two columns on this page, two on the next, two on the one after that...
- pcwalton 12y agoThat is indeed how multicol works when combined with pagination [1]. [1]: http://dev.w3.org/csswg/css-multicol-1/#pagination-and-overflow-outside-multicol http://dev.w3.org/csswg/css-multicol-1/#pagination-and-overf...