I contend that

$i/1px

Is just fine in this situation.

Chris

On Thursday, April 4, 2013, Vlad Minaev wrote:

> Consider the following example. It does not related to haml but to sass
>
> =====
>
> $minimal-font-size: 10px;
> $minimal-font-size: 15px;
>
> @for $i from $minimal-font-size through $maximal-font-size {
>   .type-*#{$i}* {
>     font-size: $i;
>    }
> }
>
> =====
>
> I'd better see *.type-10* rather then *.type-10px*
>
> пятница, 15 апреля 2011 г., 1:36:33 UTC+4 пользователь Chris Eppstein
> написал:
>>
>> It's trivial to build. But I've yet to find a compelling use case for
>> such a function.
>>
>> On Thu, Apr 14, 2011 at 2:33 PM, Chris Roth <chri...@gmail.com> wrote:
>>
>>> Perfect! Thanks, that gets the job done.
>>>
>>> Still advocate the addition of an int() function. I feel that that
>>> would be a little more elegant :p
>>>
>>> On Apr 14, 5:18 pm, Chris Eppstein <ch...@eppsteins.net> wrote:
>>> > 40px / 1px will do the trick.
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Thu, Apr 14, 2011 at 2:15 PM, Chris Roth <chrisr...@gmail.com>
>>> wrote:
>>> > > This seems like a simple enough thing to do, but I can't find it in
>>> > > the docs oddly enough. Is there a way to convert a value from pixels
>>> > > to an integer?
>>> >
>>> > > For example:
>>> >
>>> > > int(40px) == 40
>>> >
>>> > > Thanks!
>>> >
>>> > > --
>>> > > You received this message because you are subscribed to the Google
>>> Groups
>>> > > "Haml" group.
>>> > > To post to this group, send email to ha...@googlegroups.com.
>>> > > To unsubscribe from this group, send email to
>>> > > haml+uns...@googlegroups.**com.
>>> > > For more options, visit this group at
>>> > >http://groups.google.com/**group/haml?hl=en<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 ha...@googlegroups.com.
>>> To unsubscribe from this group, send email to haml+uns...@googlegroups.*
>>> *com.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/haml?hl=en <http://groups.google.com/group/haml?hl=en>.
>>>
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Haml" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to haml+unsubscr...@googlegroups.com <javascript:_e({}, 'cvml',
> 'haml%2bunsubscr...@googlegroups.com');>.
> To post to this group, send email to haml@googlegroups.com<javascript:_e({}, 
> 'cvml', 'haml@googlegroups.com');>
> .
> Visit this group at http://groups.google.com/group/haml?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to haml+unsubscr...@googlegroups.com.
To post to this group, send email to haml@googlegroups.com.
Visit this group at http://groups.google.com/group/haml?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to