Different header style for a specific view
My current Rails project requires the home page to have a header that's
different from the rest of the page's views. The only difference is the
style applied to it (bigger logo, bigger search bar...). I have a solution
that works, but it feels a little "dirty" and I'd like to know if there's
a more elegant way of styling specific pages.
So far, I'm doing this on the application's layout:
body class="#{controller_name} #{action_name}"
So I can do this on mi css:
#headerWrapper {
font-size: 1.5em;
...
}
...
.catalog.index {
#headerWrapper {
font-size: 2em;
...
}
}
But whenever I make a change to the base style here, the index page's
layout may be affected and I'm forced to "undo" whatever change I've made
(i.e. if I change the font size, I have to adapt it accordingly on the
.catalog.index part).
Any thoughts on the most elegant way of handling this issue will be much
appreciated.
Thanks.
No comments:
Post a Comment