-
Notifications
You must be signed in to change notification settings - Fork 465
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
Support time, frequency and resolution units #1167
Comments
Relevant: https://github.com/sass/sass/blob/d26e6fa17f55d64278c9f09b5ace5e256e363e3f/lib/sass/script/value/number.rb#L329 and https://github.com/sass/sass/blob/d26e6fa17f55d64278c9f09b5ace5e256e363e3f/lib/sass/script/value/number.rb#L450 # This is the source data for all the unit logic. It's pre-processed to make
# it efficient to figure out whether a set of units is mutually compatible
# and what the conversion ratio is between two units.
#
# These come from http://www.w3.org/TR/2012/WD-css3-values-20120308/.
relative_sizes = [
{
'in' => Rational(1),
'cm' => Rational(1, 2.54),
'pc' => Rational(1, 6),
'mm' => Rational(1, 25.4),
'pt' => Rational(1, 72),
'px' => Rational(1, 96)
},
{
'deg' => Rational(1, 360),
'grad' => Rational(1, 400),
'rad' => Rational(1, 2 * Math::PI),
'turn' => Rational(1)
},
{
's' => Rational(1),
'ms' => Rational(1, 1000)
},
{
'Hz' => Rational(1),
'kHz' => Rational(1000)
},
{
'dpi' => Rational(1),
'dpcm' => Rational(1, 2.54),
'dppx' => Rational(1, 96)
}
] Mutually compatible units should be coerced to the unit in the first operand -- that's the behavior in Ruby Sass. |
I have a half backed branch around for this. Thought to include it with the other number related refactoring! Let me see if I get something working in a few hours! |
We currently do not support the following units
Source http://www.w3.org/TR/css3-values/#other-units
Ruby Sass
Libsass
The text was updated successfully, but these errors were encountered: