I want <foo> tags to act exactly equivalent to <bar> tags, without knowing anything about the styles applied by the site’s stylesheet, user’s stylesheet, or the default user agent behavior. For example, making a <bq> tag which acts exactly like a <blockquote> tag or a <latinname> tag that should inherit from the <em> tag’s styles.
In other words, is there a way to tell foo to inherit everything from bar‘s style?
If you must, use the CSSOM and iterate through every selector of every rule of every stylesheet (
document.styleSheets), replacingfoowithbarwhere appropriate. I’d recommend you use CSS classes instead.