Code Monkey home page Code Monkey logo

Comments (1)

css-meeting-bot avatar css-meeting-bot commented on August 28, 2024

The CSS Working Group just discussed [css-grid-3][masonry] Make auto-fit do things, and agreed to the following:

  • RESOLVED: Make auto-fit drop tracks after sizing and placement, and apply content distribution to the tracks again afterward
The full IRC log of that discussion <dbaron> fantasai: tab pointed out that the auto-fit value in masonry specs is designed to behave the same as auto-fill
<dbaron> fantasai: auto-fill will fit as many columns as fit in the containing block and leave that there
<dbaron> fantasai: auto-fit will do that, but then collapse any columns that are free after placement
<dbaron> fantasai: so we could do similar in masonry, but if we're doing auto sized columns it might not be as exciting
<TabAtkins> q+
<dbaron> fantasai: but we can redistribute the space if you have a fixed # of columns or an auto # of colums that ...
<dbaron> fantasai: so we can still do things like collapse the empty columns in masonry
<dbaron> fantasai: so if you have fewer items than columns or explicitly placed columns then you can end up with empty tracks
<dbaron> florian: any reason not to?
<dbaron> fantasai: I can't think of any reason not ot.
<dbaron> s/not ot/not to/
<dbaron> TabAtkins: a potential reason: if you move the columns around and potentially change size or gap between them (have spanners), this changes the size of things in the columns because they now have more space to flow into, which could make things shorter and could theoretically change column placement
<dbaron> TabAtkins: so your final masonry might end up more ragged than it would otherwise have been
<dbaron> TabAtkins: but that's largely a non-issue because your masonry is nearly empty
<dbaron> florian: but if you didn't want that, use the other keyword that doesn't do that
<dbaron> fantasai: also you can do this after track sizing
<dbaron> fantasai: size tracks, place items, figure out what's empty, don't resize the tracks afterwards
<dbaron> fantasai: doesn't reduce space into the tracks (like grid), but lets you redistribute spcae using alignment properties
<dbaron> fantasai: that track won't get empty, but increased gap size will increase available space to spanning item
<dbaron> florian: either way we're discussing whether it does the same as auto-fill, so if you don't want the rejiggering, use auto-fill
<dbaron> fantasai: further comments?
<dbaron> oriol: a question: if you use the align properties like align-content and set them to stretch, and then we can't stretch the tracks, does stretch not work on masonry?
<dbaron> oriol: is it just in this case where you're collapsing tracks... or in general?
<dbaron> fantasai: probably need to apply the distribution before placements -- size the tracks, apply alignment, then place items.
<dbaron> fantasai: if you want to do this drop tracks and then reapply values... wouldn't apply stretch because we don't want to resize the tracks
<dbaron> oriol: then if the values stretch, you have start alignment? fall back to other alignment?
<dbaron> fantasai: I think you get start.
<dbaron> fantasai: I think you have the same problem in grid if you don't have any auto tracks and you say stretch.
<dbaron> fantasai: we might want to give stretch a fallback alignment option.
<dbaron> fantasai: should we do it? I see Rachel nodding.
<fantasai> RESOLVED: Make auto-fit drop tracks after sizing and placement, and apply content distribution to the tracks again afterward

from csswg-drafts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.