Least bytes, but how much more specific?
It seems to me that for selectors, in most cases you cannot get less than two characters plus a space, especially if we are talking about the "global" use of adding specificity (which seems to be the case since you used html ). Therefore, to save CSS, you need one id symbol per html . I would say id (not a class), since you would like to keep it unique. So you implement the same in html:
<html id="A">
Which then allows the shortest possible addition of a selector to CSS:
#A .whateverYour [OriginalSelector] string .was {}
Then, using what James Donnelly said (which, incidentally, I never knew about repeating the same selector), you could constantly add more and more specificity with the least number of characters, for example:
#A#A#A .whateverYour [OriginalSelector] string .was {}
Renouncement
Answering my questions, I do not recommend that this is necessarily a good way to make CSS, as well as a good way to deal with specific issues. But I believe that adding a short identifier for one character to the html element is the least number of bytes that could be used to increase the specificity of any selector that answers this question here.
ScottS
source share