W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2009

[whatwg] <figure><img><* caption>

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 1 Dec 2009 09:15:36 -0600
Message-ID: <dd0fbad0912010715h238655e9ud23ad62f9bfdb1c3@mail.gmail.com>
On Tue, Dec 1, 2009 at 9:07 AM, Lachlan Hunt <lachlan.hunt at lachy.id.au> wrote:
> Applying reset styles alone and making all elements look the same basically
> defeats the purpose of being able to use a range of different elements, and
> is very likely not what an author would ultimately want.

Heh, you either want consistent styling, in which case you use a
reset, or you want element-specific styling, in which you don't.
Can't have it both ways.  ^_^

> Reset styles are just used to give different elements a more level playing
> field for new styles, and so authors would then still have to go through all
> the elements and style them appropriately for use as a caption. ?Plus,
> authors have to worry about cascading issues from other styles in their own
> stylesheets.
>
> Say, for instance, an author had applied special styles to paragraphs in
> some special type of section:
>
> #foo p { margin-left: 1em; }
>
> And then a content writer puts a figure in there using <p caption>, but the
> CSS author failed to adequately account for figures being used in that
> section, despite doing:
>
> p[caption] { margin: 0; }
>
> Due to specificity, the first rule would apply regardless and the caption
> would get a potentially unwanted margin.
>
> I know there are ways to work around the issue, such as using !important or
> finding ways to increase the specificity of the latter selector, but the
> point is that introducing unnecessary element clashes creates needless
> complexities that should be avoided.

This is a valid complaint.

~TJ
Received on Tuesday, 1 December 2009 07:15:36 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:19 UTC