piblog

pibil's blog: <!-- meta's best friend -->


Wed, 16 Apr 2003

Added :after to abbr #
This entry has been posted to css-d@lists.css-discuss.org

Since I am addicted to the abbr element, I was concerned that readers were losing some semantic value when they printed a page that contained content in which I used abbr. To enhance the value of abbr, I have decided to add the :after pseudo-element selector to my print media stylesheet.

Now when the document prints, the value in the title attribute of abbr is printed after the content and is enclosed in parentheses. Here is the markup added to my basic-print.css:

abbr:after {content:" (" attr(title) ")";font-size: 90%;}

NOTE: Yes, I do know that there is a difference between abbr and acronym but since it looks like abbr will be dropped from XHTML2, I thought I would switch over to only using abbr now. |/css|