I'm writing a Stylish extension that applys Inter to all sans-serif text, and Georgia to serif text. Because Stylish works by injecting the customized CSS stylesheet into the original HTML, I think I have to use selectors to do that. My code is:
*[style~=sans-serif]{
font-family: Inter, sans-serif;
}
*[style~=serif]{
font-family: Georgia, serif;
}
However, that basically doesn't work. I searched the web but didn't found how to compose a selector based on font-family. Is it possible? If not, is there some other ways to achieve it?