-
Notifications
You must be signed in to change notification settings - Fork 141
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-typed-om] 'fr' units cannot be used in a calc #734
Comments
I think that's accidental - we just made an explicit list of types at one point, and fr units were added after that point, and we never thought to add it. I'm asking @fantasai for confirmation; if so, I'll just fix |
You spent a lot of effort arguing that the spec didn't allow |
No, I argued that fr couldn't be combined with |
Agenda+ to confirm that allowing 'fr' units in calc() (not combinable with anything, just on their own) is okay (and V&U should change as a result). |
Whoops, w3c/csswg-drafts#2665 points out the (Like |
The Working Group just discussed
The full IRC log of that discussion<dael> Topic: 'fr' units cannot be used in a calc<dael> github: https://github.com//issues/734 <dael> TabAtkins: When typed OM defined math rules treated fr like any other type <dael> TabAtkins: YOu can devide a resolution by 2 for example. Anything else added confusion. But looking at value spec fr and resolution aren't allowed in calc. <dael> TabAtkins: Seems like not it's a purposeful limitation. I think the types were added to V&U after calc. Given you can express them in typed om I'd like to be able to express in calc. Or go back to typed OM and say no you can't use these. That's oddly limiting. Proposal is allow fr units and resolution units in calc. They are independant units. <dael> dbaron: I think we have resolutions to allow more unit algebra in calc. <dael> TabAtkins: [missed] <dael> dbaron: Then they're their own type in the unit algebra. <dael> TabAtkins: Yes. fr doesn't add to length, though. but you can combine as long as end result is a reasonable unit. <dael> Rossen_: Soulds reasonable. Other opinions? <dbaron> I'm in favor. <dael> AmeliaBR: I'd ask that maybe somewhere there's an informative note emphasizing fr can't be added and combined with length and %. <dael> TabAtkins: I think that's a note in grid. If not, I'm happy to add it. <dael> AmeliaBR: Sounds good. <dael> Rossen_: I think V&U is good for this note. <dbaron> That said, it seems like we might want to be able to add in the future... <dael> Rossen_: Anything besides the note. Other ideas or objections? <dael> RESOLVED: Allow fr and resolution units in calc functions, add a not to V&U explaining they don't combine with length <dael> TabAtkins: Do we want a standing resolution that any new numeric units should add to calc? <dael> chrisl: I'd rather exceptions on case by case basis. <dael> TabAtkins: Agree. <dael> Rossen_: Sounds reasonable. It's not like we add numeric that often <dael> dbaron: Agree new numeric values should be supported by calc. <dael> Rossen_: Separate resolution for CSS Values that adds a note that numeric values are supported by defualt in calc <dael> TabAtkins: New unit value types should be added to calc as they're added to CSS <dael> Rossen_: Obj? <dael> RESOLVED: Add a note to CSS Values that new unit value types should be added to calc as they're added to CSS |
It seems like you can't use 'fr' units in a calc, but you can create a
CSSMathValue
containingCSSUnitValues
withfr
units. Is this going to change? If not, we should handle this case (maybe throw an exception when trying to create aCSSMathValue
withfr
units?)The text was updated successfully, but these errors were encountered: