[uf-discuss] [citation]: Brian's outstanding issues 1: UID

Gareth Andrew freega at freegarethandrew.org
Wed Sep 27 16:14:12 PDT 2006


Ryan King wrote:
> On Sep 25, 2006, at 5:41 PM, Michael McCracken wrote:
>
>> On 9/25/06, Scott Reynen <scott at randomchaos.com> wrote:
>>> On Sep 25, 2006, at 4:58 PM, Michael McCracken wrote:
>>>
>>> > I like Brian's suggestion to use a type class to denote what type of
>>> > UID it is while avoiding a huge list of new class names.
>>> >
>>> > <span class="uid"><span class="type">DOI</span>: <a class="value"
>>> > href="http://dx.doi.org/stuff">...</a></span>
>>> >
>>> > It seems like this need for a typed value recurs elsewhere, and a 
>>> good
>>> > solution could become another useful design pattern for microformats
>>> > in general.
>>>
>>> Indeed, this looks like what we're already doing in hCard with tel
>>> types.
>>
>> Yep - http://microformats.org/wiki/hcard#type_subproperty_values
>>
>> So suppose I wanted to apply a different style to different types of
>> vcard properties - for instance to highlight all 'home' phones. Is
>> there a good way to do that in CSS?
>
> Not currently. You'd have to either add a classname in the markup or 
> write some javascript that read the contents of the .type and adds a 
> classname.
>
> -ryan
> _______________________________________________
Ryan is right you can do it currently, but (afaict) you will be to do it 
with CSS3 with the adjacent selector and the contains pseudo-class eg.

span.type:contains("DOI") + a.value{
    color: red;
}

Gareth.




More information about the microformats-discuss mailing list