Re: CSS styling of Microdata, RDFa, Microformats

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 UTC