Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-grid] Introduce a "forced" version of the fr unit. #2677

Open
Dan503 opened this issue May 14, 2018 · 3 comments
Open

[css-grid] Introduce a "forced" version of the fr unit. #2677

Dan503 opened this issue May 14, 2018 · 3 comments
Labels
css-grid-3 Masonry Layout

Comments

@Dan503
Copy link

Dan503 commented May 14, 2018

In issue #1777, It was recognized that authors would really like it if 1fr actually meant minmax(0,1fr) rather than minmax(min-content,1fr) which is what it essentially means right now.

It was closed due to it being too hazardous to change the meaning of the fr unit at that point in time.

What I am suggesting is that a new unit be introduced that does equal minmax(0,1fr). I'm thinking an efr unit (short for "equal fraction").

It's really cumbersome writing out minmax(0,1fr) all the time. It would be much nicer if we could write 1efr instead.

The conversation in issue #2270 (comment) also makes note of the need for an easier way to write equal fractions.

Spec link for the fr unit:
https://www.w3.org/TR/css-grid-1/#fr-unit


Update

I've changed my mind about the unit name. I believe it should be named ffr now instead of efr so that it implies "forced fraction" instead of "equal fraction"

Reasons explained in this comment:
#2677 (comment)

@fantasai fantasai added css-grid-2 Subgrid; Current Work css-grid-3 Masonry Layout and removed css-grid-2 Subgrid; Current Work labels May 29, 2018
@fantasai
Copy link
Collaborator

Let's see if we can fix #1865 and if that solves the problem first. :)

@Dan503
Copy link
Author

Dan503 commented Oct 29, 2023

I have changed my mind about what the unit name should be.

I think ffr would be better. It means "forced fraction".

You are forcing it to take the fraction size and ignore the content size. So a "forced" version of the fr unit makes more sense to me than efr (aka "equal fraction). "Equal fraction" makes me think "what is it equal to?".

Also ffr is easier to type than efr.

@Dan503 Dan503 changed the title [css-grid] Introduce an "equal" version of the fr unit. [css-grid] Introduce a "forced" version of the fr unit. Oct 29, 2023
@Loirooriol
Copy link
Contributor

Your problem is not with the fr unit, it's with the default min track sizing function.
So adding a new unit seems like a wrong solution to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-grid-3 Masonry Layout
Projects
None yet
Development

No branches or pull requests

3 participants