Skip to content

Instantly share code, notes, and snippets.

@scarfacedeb
Created May 3, 2014 09:03
Show Gist options
  • Select an option

  • Save scarfacedeb/3abdf5be07086eb7eb44 to your computer and use it in GitHub Desktop.

Select an option

Save scarfacedeb/3abdf5be07086eb7eb44 to your computer and use it in GitHub Desktop.
A way to use helpers in stylesheets
/*
*= require rails_admin/ra.globalize_tabs
*/
<% environment.context_class.instance_eval { include DecorationsHelper } %>
.well .order-items-images img {
max-width: 150px;
}
<% artwork_decorations[:frame_bg].each do |frame_bg| %>
[data-frame-bg="<%= frame_bg.slug %>"] {
background: #<%= frame_bg.background %>;
border-color: #<%= frame_bg.background %>;
border-left-color: <%= lighten_color(frame_bg.background) %>;
border-right-color: <%= lighten_color(frame_bg.background) %>;
}
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment