Created
July 17, 2014 18:31
-
-
Save rsl/f879aab2bed11bca27a7 to your computer and use it in GitHub Desktop.
don't conditionally set "display: none" as style. set a conditional class and leverage nested SCSS rules.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#survey_search { | |
&.hide { | |
display: none; | |
} | |
// Other rules | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_tag({}, id: 'survey_search', class: params[:query].present? ? 'show' : 'hide') do %> | |
Some HTML | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment