W3C home > Mailing lists > Public > public-html-data-tf@w3.org > November 2011

Re: CSS styling of Microdata, RDFa, Microformats

From: Dan Brickley <danbri@danbri.org>
Date: Fri, 18 Nov 2011 23:07:42 +0100
Message-ID: <CAFNgM+aNtUedqTgUYCNt4e-zOa1Jx+cF49_qV-G17u-VxUh6rA@mail.gmail.com>
To: Jeni Tennison <jeni@jenitennison.com>
Cc: public-html-data-tf@w3.org, Tantek Çelik <tantek@tantek.com>
On 18 November 2011 22:56, Jeni Tennison <jeni@jenitennison.com> wrote:
> Dan,
>
> I added CSS support as a consideration when choosing a HTML data syntax at [1]. The text reads:
>
>  Because microformats generally use classes to mark up data within an
>  HTML page, it is easy to use CSS to style those elements based on their
>  type. For example .hcard .n { font-weight: bold; } will enbolden any
>  person's name. This is a little harder with microdata (where the selector
>  might be something like [itemtype~="http://microformats.org/profile/hcard"]
>  [itemprop~="n"]) or RDFa (where it might be [typeof~="foaf:Person"]
>  [property~="foaf:name"]). If you are planning to style your page based on
>  the data embedded within it, you may find it easier to use microformats
>  than either microdata or RDFa.
>
> Does that sound reasonable?

Thanks for following this up. It sounds fair, from my limited
knowledge. You might add something like "...or plan for dependencies
between your CSS documents and any prefixes used in your RDFa."

Also, since there is a default context now for RDFa, that perhaps
introduces some basic stability that CSS can match against even
without it understanding the prefixing notion. It doesn't guarantee
that e.g. 'foaf:' will always be bound to FOAF's URI, but it might be
enough for managing CSS in many situations.

Dan

> Jeni
>
> [1] http://www.w3.org/wiki/Choosing_an_HTML_Data_Format#Syntax_Considerations
> --
> Jeni Tennison
> http://www.jenitennison.com
>
>
Received on Friday, 18 November 2011 22:08:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 18 November 2011 22:08:21 GMT