-
Notifications
You must be signed in to change notification settings - Fork 120
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
Gap does not support a value of Auto #265
Comments
Yep, I'm happy with |
Shooting from the hip here: // Dimension with a fixed length or known quantity
enum Dimension {
Points(f32),
Pixels(f32),
Em(f32),
Percent(f32)
}
// Dimension with a possible unknown quantity
enum UnDimension {
Auto,
Undefined,
Points(f32),
Pixels(f32),
Em(f32),
Percent(f32)
} Alternatively enum UnDimension {
Auto,
Undefined,
Defined(Dimension)
} Or another attempt at removing |
I think we might want to avoid Regarding |
Just out of curiosity, what is the |
In the case of |
Sorry to take this off-topic, but is having an |
The answer to that is not obvious to me (advantage: it uses standard types. disadvantage: it requires wrapping everything in |
😅 I tried that (#188, #160, #148) but could never get it across the finish line due to subtle bugs that I was never able to come to the bottom of. The codebase in general looks much better now (❤️ @nicoburns), so maybe it is time for another attempt at it. Achieving that would make the codebase more idiomatic rust, but might move further away from being "css-like" which we may or may not want. |
Problem
To match CSS, the
gap
property should not really haveAuto
orUndefined
variants.See: bevyengine/bevy#6743 (comment)
Proposed solution
A new
LengthPercentage
enum which does not include theUndefined
orAuto
variantsNot 100% sure on the name, but
LengthPercentage
is what the CSS specification uses and is pretty descriptive.Notes
This isn't really a problem in practice. We currently just treat
Auto
andUndefined
as0.0
. But it is potentially confusing to users of taffy.The text was updated successfully, but these errors were encountered: