[uf-dev] Using class for non-human data

Jake Archibald jaffathecake at gmail.com
Tue Jun 24 08:54:42 PDT 2008


One possible issue with the data{blah} pattern, if you were to point
at that with a css selector, you'd need to escape the curly braces.

span.dtstart.data\{20080101\} { color:red; }

obviously the above wouldn't work at all in IE6, but you see what I'm
getting at. This wouldn't be an issue with data-blah.

On 6/24/08, Scott Reynen <scott at randomchaos.com> wrote:
> On [Jun 24], at [ Jun 24] 5:52 , André Luís wrote:
>
>> <abbr class="dtstart data{2008-06-23}" title=June 23rd, 2008">Today</
>> abbr>
>>
>> 1. grab elementByClassName( dtstart )
>> 2. get classnames as array
>> 3. grab classname after dtstart(ie, i+1, i being the index of
>> dtstart), does it match /data{[^}]*}/ ?
>> 4. if yes, use it as value.
>>
>> What's so wrong with this approach?
>
>
> I'd say there's nothing "so" wrong about it, but there are problems.
> Specifically, "data{2008-06-23}" doesn't seem to be an actual
> classification of "Today."  It doesn't make much sense to say "Today
> belongs to the class data{2008-06-23}."  But the HTML spec says " the
> element may be said to belong to these classes."  Unfortunately we may
> not see the practical implications of such a seemingly insignificant
> deviation from the spec until after a decision is made, as happened
> with the abbr pattern.  Another seemingly small issue: this solution
> binds us to machine-readable data formats that have no spaces.  These
> may not be reasons to discard this solution, but I hope they're at
> least reasons to more thoroughly research potential problems so we
> don't make the same type of mistake again.
>
> Peace,
> Scott
>
>
> _______________________________________________
> microformats-dev mailing list
> microformats-dev at microformats.org
> http://microformats.org/mailman/listinfo/microformats-dev
>

-- 
Sent from Google Mail for mobile | mobile.google.com



More information about the microformats-dev mailing list