Hi Jeff, I would probably do something like this:
.italic .booktitle{ font-style: normal;} Unless I'm missing a more complicated issue. Hope that helps a bit. On Thu, Sep 10, 2020, 5:54 AM Jeff Zeitlin <edi...@freelancetraveller.com> wrote: > Normally, the title of a book should be set in italics. I'm a big fan of > semantics, so I have a class called "booktitle": > > .booktitle { > font-style: italic; > } > > > I also have a class called "editorial": > > .editorial { > font-size: 0.8em; > font-style: italic; > } > > which I use for setting blocks of text that are author's or editor's > comments or clarifications of the associated article text. There are a few > other classes that I use that set font-style: italic; as well. > > However, when a book title appears within already-italicised text, it > should be set as "roman"/upright/non-italic. > > (Technically, if font-style: italic; is in effect, _any_ text that would be > italicised if set among normal text should be set as non-italic.) > > Is there some relatively clean way of defining .booktitle such that if > {font-style: italic;} or {font-style: oblique;} is currently in effect > (whether from applying the em tag, or another style that sets italic, or > inherited from a higher-level style application), I apply {font-style: > normal;}, otherwise, I apply {font-style: italic;}? > > ("relatively clean": I want to avoid javascript, perl, etc., for Reasons.) > -- > Eönwë > (SpamCop subscriber, not staff/admin) > ______________________________________________________________________ > css-discuss [css-d@css-discuss.org] > http://www.css-discuss.org/mailman/listinfo/css-d > List wiki/FAQ -- http://css-discuss.incutio.com/ > List policies -- http://css-discuss.org/policies.html > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ ______________________________________________________________________ css-discuss [css-d@css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/