You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Elliptical border-radius is interpreted as expression. #16
That doesn't work; border-radius: 12px/10px; still gets compiled to border-radius: 1.2;.
And if I try the example from the the documentation of the Shorthand method (font-size: small/12pt;), I get an error: Cannot apply operator / to the left hand side: small.
Checking for "radius" would be an option, although it wouldn't be my ideal solution. I guess that would also mean I can no longer use division expression in border-radius.
I don't know if it is possible, as you can guess from my "font" example; I'm not a CSS expert. But would it be possible to check for the units?
Currently, 12/10px is compiled to 1.2px, but 12px/10px is compiled to simply 1.2. Do you think it the presence of the units is enough to signal that this is not an expression to be evaluated? Or would that be to confusing?
Activity
jamesfoster commentedon Feb 9, 2011
there is a special case which allows this. simply remove the spaces from around the slash.
https://github.com/dotless/dotless/blob/master/src/dotless.Core/Parser/Parsers.cs#L316
tomlokhorst commentedon Feb 10, 2011
That doesn't work;
border-radius: 12px/10px;still gets compiled toborder-radius: 1.2;.And if I try the example from the the documentation of the Shorthand method (
font-size: small/12pt;), I get an error:Cannot apply operator / to the left hand side: small.jamesfoster commentedon Feb 14, 2011
font-size: small/12pt;is not valid. the shorthand form isfont: small/12pt;which is equivalent tohere is the line which restricts it to the
fontrule.https://github.com/dotless/dotless/blob/master/src/dotless.Core/Parser/Parsers.cs#L668
I guess we could expand that to rules where the name contains "radius" ?
What do you think?
tomlokhorst commentedon Feb 15, 2011
Checking for "radius" would be an option, although it wouldn't be my ideal solution. I guess that would also mean I can no longer use division expression in border-radius.
I don't know if it is possible, as you can guess from my "font" example; I'm not a CSS expert. But would it be possible to check for the units?
Currently,
12/10pxis compiled to1.2px, but12px/10pxis compiled to simply1.2. Do you think it the presence of the units is enough to signal that this is not an expression to be evaluated? Or would that be to confusing?lukeapage commentedon Aug 24, 2011
Similiar issues in less.js (also unresolved)
less/less.js#146
less/less.js#206
I like the fact that less is a superset of css - and this particular bug means less compiles normal css into something unexpected.
rytmis commentedon Mar 1, 2015
"Strict math mode" for dotless would be the thing that resolves this one, too.
rytmis commentedon Mar 22, 2015
2e10803 introduces Strict Math for dotless. I've no idea as to how well this compares to less.js, but it's a start.