Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Style inheritance #5

Open
matmcph opened this issue Apr 20, 2011 · 0 comments
Open

Style inheritance #5

matmcph opened this issue Apr 20, 2011 · 0 comments

Comments

@matmcph
Copy link
Contributor

matmcph commented Apr 20, 2011

When defining a style on a row, the children do not inherit those styles if they have any other styling on them.
For example:

template(:row, :data) do
  style_class 'foo'
  cell { # Would inherit the styles
    data some_data
  }
  cell { # Would not inherit the styles
    data some_amount
    format :currency
  }
end

To get the previous currency cell to have the styles, you have to do something like this:

template(:row, :data) do
  style_class 'foo'
  cell {
    data some_amount
    format :currency
    style_class 'foo'
  }
end
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant