wolfwings: (Default)
wolfwings ([personal profile] wolfwings) wrote2007-01-27 03:58 am

Finally updating here again...

...because I found an incredibly nifty feature of CSS that all this time I hadn't known about, that I'm working to integrate into that web-comic-interface program I was building before: Selectors. It's useful enough I'll deal with posting it here just so everyone on my friends list sees it.

Most folks know about the a:hover CSS-tag that lets you set the 'hover' style for a link, or the div.warning to let you style <div class="warning"> (which is actually a shorthand for something I'm about to show here) but I bet you didn't know about td[direction~="up"] did you? That lets you define new attributes for your elements, for example in this case making this valid: <td direction="up left"> and applying the "up" and "left" styles if you have both defined.

The fairly well-known td.card form (using the class="blah" attribute) is actually nothing more than a shorthand for td[class~="card"] actually. The ~= means that the attribute is treated as a series of space-seperated values, and matches against each one individually. If you replace it with =, as in td[direction="apples and oranges"] then the CSS-style will only apply to that explicit attribute tag, for example if you need to perform some special trickery on some combinations of your custom attributes.

A minimal example of the effect.

Oh cripes!

[identity profile] wolfwings.livejournal.com 2007-01-31 09:57 pm (UTC)(link)
I totally forgot about that in the intervening months between dealing with my grandpa passing away and then helping get ready for FC... and then helping out AT FC. Only not getting my head fully above water again. Gods, thanks for tracking me down. :-)

And the next con I'm guaranteed to be at is FC next year, the next con I plan to attend actually is RCFM. I'm so sorry about totally botching getting you my full contact info before the last RCFM was over though. =-.-=

Re: Oh cripes!

[identity profile] animecat.livejournal.com 2007-02-01 03:13 am (UTC)(link)
Well why don't we plan on meeting at RCFM then? I'm guaranteed to be there. And if you can't make it, I'll see about mailing your badge to you.

Re: Oh cripes!

[identity profile] wolfwings.livejournal.com 2007-02-01 07:43 am (UTC)(link)
Done!

Any chance of seeing a scan or webcam shot of it or something before then? I'm nosy/curious. =^.^=