I know CSS isn't supposed to have content, but it does, like this nice box (below) extracted from the Twitter Bootstrap documentation CSS:
/* Echo out a label for the example */
.bs-docs-example:after {
content: "Example";
}
I don't care for "Example", I use something like that as a mixin:
.box (@legend) {
/* Echo out a label for the example */
&:after {
content: @legend;
}
}
Then I don't need really dynamic CSS, I can easily include the mixin in a class, but instead of passing "Observation"
I need to pass t 'box.observation'
:
.observation {
.box("<%= t 'box.observation' =>");
}
Rails is supposed to follow Conventions over Configuration, it is very easy to just add a static CSS/LESS/SCSS and it is already included in all pages in a single minified CSS. What is the convention for internationalized CSS? For example, where I am supposed to put declarations like that of .observation
?