The multiplication shouldn't fail; it should produce 23.4em*px. If you want that in pixels only, you need to divide by 1em.
On Tue, Jan 4, 2011 at 9:46 AM, Abhik Pramanik <[email protected]> wrote: > Hi all, > > Is there a way to strip out the units from a variable? > > I want to do something along the lines of: > > $font-size: 18px; > $line-height: 1.3em; > $approximate-px-height: $font-size * $line-height; > > Without stripping out the units the multiplication operation fails. > > Abhik > > -- > You received this message because you are subscribed to the Google Groups > "Haml" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected] <haml%[email protected]>. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/haml?hl=en.
