I'm trying to replace a series of strings in my Atom's status bar using styles.less. I've figured out that there's rudimentary conditional logic using 'when' but I've only seen examples passing variables, none with existing html properties.
What I'm trying to do, is recognise the contents of a div tag that can take on either of these states:
<div class="status-bar-vim-mode-plus-insert">I</div>
<div class="status-bar-vim-mode-plus-insert">IR</div>
What I'd like to be possible is something along these lines:
.status-bar-vim-mode-plus-insert when (content: "I")
{
&:after
{
content: "NSERT";
}
}
.status-bar-vim-mode-plus-insert when (content: "IR")
{
&:after
{
content: "EPLACE";
}
}
I've been searching for 2 or 3 hours now, but so far I've come up short of finding an answer to whether or not this is even possible.