Local Vars to CSS.erb Files

Is it possible to pass local data with the stylesheet_link_tag option the same way you can with partials? I thought the markup would be:

<%= stylesheet_link_tag "pages/beers", locals: { beer_name: beer_url }  %>

With beers being named beers.css.erb.

What I’m trying to accomplish is this: I have a number of beers that share the same template, but I want each beer to have a different color theme such as the background color. I would ideally like to be able to pass a hex value to the CSS file based on local data that an editor has entered. I’m struggling to find a way to pass variables to CSS.erb files.

Anyone have any ideas?

Is each beer a page?
if thats the case you can just add this to the body tag of each beer page and fix the style in you css file

<body class="<%= page_classes %>">

this will generate a class name same as your file name, something like that

<div class="beer-flavour-1">