Well, this is similar as to what I was typing in a fiddle... I've been following a similar approach lately (while in the beginning this little voice inside of me said css was not meant to control content) - but anyway, I sort of think getting content like attr(data-label-yes); is acceptable. And for quick jobs I don't mind typing in text in css :) haha
I have not dealt with multi language cases yet using this approach, but I would either have the language specific content inside the data attribute anyway to grab or in some other cases perhaps localized css files (as you noted as well). So I guess we're sort of on the same page here. @Dimitar, I have checked your latest efforts yeah, nice work! Using text-var settings as class options is probably the most obvious way to go when you have a class. But I've been using Aaron's Delegator and Behavior a lot lately and with Delegator you sometimes don't have a class when you just reveal something clicking a button or link. But you often want to update the text of the link you clicked. So I switched to using data-attributes or css content or a combination of it if possible. If not I'd have a super simple class handling this through JS and class options.. Rolf On Feb 20, 9:04 pm, Sanford Whiteman <[email protected]> wrote: > > Can you give an example of your usage of :after? Not sure I follow what > > you're saying here. > > http://jsfiddle.net/ymseR/1/ > > > If the text is hard-coded then it's probably even messier to manage > > this. > > I never said anything about "hard-coding." In fact, if you look at the > example, it's perfectly suited for language-specific strings stored as > styles. > > -- S.
