Tip on how to apply theme properties to tag attributes that include a space

This might be obvious, but I couldn’t find it anywhere and had to figure it out. It might save somebody some minutes for me to post it here. Let me illustrate what I mean. You can apply a theme to a specific tag like @person with this,

run[tag=data-person] {
  font-style: italic;
  color: @person-color; //This is a made up variable that should be defined somewhere :) 
}

But you might not know that you is that you can even specify a value that includes a space like @person(John Smith) with this,

item[data-person] {
  > run[tagvalue='John Smith']{
    color: @person-John-color;
  }
}

Again, this looks painfully obvious now if you read somewhere that you could do something to tag specific attribute values without spaces (found in the forum); but it wasn’t obvious to me to use this in combination with the quotation marks when I was attempting to do it. So here is in case someone ever wonders how to do this :smile:

3 Likes