I am trying to figure out if there is a way for a number that is
dynamically created inside of a mixin to be used by other mixins.

In this example I am creating an !inner_width variable by subtracting
margins, borders, and padding from an !total_width value which is
passed in.
I would then like to be able to pass that number to another mixin (for
instance an element inside of the container using this)


=section(!total_width, !margin_width, !border_width, !padding_width)
  !inner_width = !total_width  -  (!margin_width*2)  -  (!
border_width*2)  -  (!padding_width*2)
  width = !inner_width
  float: left
  margin = !margin_width
  border = !border_width "solid" !body_border_color
  padding = !padding_width

However when I try to call !inner_width in another mixin it is not
found. I guess this is a variable scope issue? Is there anyway for a
dynamically created value to be accessible across mixins?

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

Reply via email to