Reading List
The most recent articles from a list of feeds I subscribe to.
Flexible multiline definition lists with 2 lines of CSS 2.1
If you’ve used definition lists (<dl>) you’re aware of the problem. By default, <dt>s and <dd>s have display:block. In order to turn them into what we want in most cases (each pair of term and definition on one line) we usually employ a number of different techniques:
- Using a different
<dl>for each pair: Style dictating markup, which is bad - Floats: Not flexible
display: run-in;on the<dt>: Browser support is bad (No Firefox support)- Adding a
<br>after each<dd>and setting both term and definition asdisplay:inline: Invalid markup. Need I say more?
If only adding <br>s was valid… Or, even better, what if we could insert <br>s from CSS? Actually, we can! As you might be aware, the CR and LF characters that comprise a line break are regular unicode characters that can be inserted anywhere just like every unicode character. They have the unicode codes 000D and 000A respectively. This means they can also be inserted as generated content, if escaped properly. Then we can use an appropriate white-space value to make the browser respect line breaks only in that part (the inserted line break). It looks like this:
dd:after { content: ‘\A’; white-space: pre; }
Note that nothing above is CSS3. It’s all good ol’ CSS 2.1.
Of course, if you have multiple <dd>s for every <dt>, you will need to alter the code a bit. But in that case, this formatting probably won’t be what you want anyway.
Edit: As Christian Heilmann pointed out, HTML3 (!) used to have a compact attribute on <dl> elements, which basically did this. It is now obsolete in HTML5, like every other presentational HTML feature.
You can see a live result here:
Tested to work in IE8+, Chrome, Firefox 3+, Opera 10+, Safari 4+.
A List Apart article: Every time you call a proprietary feature "CSS3", a kitten dies
My first article in ALA was published today, read it here:
Every time you call a proprietary feature “CSS3”, a kitten dies
Some comments about it on twitter:
https://twitter.com/kkmett/status/169424038421204994
https://twitter.com/codepo8/status/169425611801108480
https://twitter.com/lydiamann/status/169425704092573696
https://twitter.com/zeldman/status/169426392654684160
https://twitter.com/alistapart/status/169426553787256833
https://twitter.com/happycog/status/169426900865908737
https://twitter.com/AlanBWhitney/status/169428991470612480
https://twitter.com/LeftyDesigner/status/169430280883544064
https://twitter.com/dap6000/status/169432718038409216
https://twitter.com/martuishere/status/169434598911123456
https://twitter.com/rachelober/status/169442236709355521
https://twitter.com/sgalineau/status/169443447554580480
https://twitter.com/sdague/status/169448377824722944
https://twitter.com/whitman/status/169451221495717889
https://twitter.com/peterwinnberg/status/169456073466585088
https://twitter.com/cssquirrel/status/169468390736527360
https://twitter.com/jameswillweb/status/169475627274088448
https://twitter.com/rogerjohansson/status/169482651198160896
A List Apart article: Every time you call a proprietary feature "CSS3", a kitten dies
My first article in ALA was published today, read it here:
Every time you call a proprietary feature “CSS3”, a kitten dies
Some comments about it on twitter:
https://twitter.com/kkmett/status/169424038421204994
https://twitter.com/codepo8/status/169425611801108480
https://twitter.com/lydiamann/status/169425704092573696
https://twitter.com/zeldman/status/169426392654684160
https://twitter.com/alistapart/status/169426553787256833
https://twitter.com/happycog/status/169426900865908737
https://twitter.com/AlanBWhitney/status/169428991470612480
https://twitter.com/LeftyDesigner/status/169430280883544064
https://twitter.com/dap6000/status/169432718038409216
https://twitter.com/martuishere/status/169434598911123456
https://twitter.com/rachelober/status/169442236709355521
https://twitter.com/sgalineau/status/169443447554580480
https://twitter.com/sdague/status/169448377824722944
https://twitter.com/whitman/status/169451221495717889
https://twitter.com/peterwinnberg/status/169456073466585088
https://twitter.com/cssquirrel/status/169468390736527360
https://twitter.com/jameswillweb/status/169475627274088448
https://twitter.com/rogerjohansson/status/169482651198160896
Vendor prefixes, the CSS WG and me
The CSS Working Group is recently discussing the very serious problem that vendor prefixes have become. We have reached a point where browsers are seriously considering to implement -webkit- prefixes, just because authors won’t bother using anything else. This is just sad. :( Daniel Glazman, Christian Heilmann and others wrote about it, making very good points and hoping that authors will wake up and start behaving. If you haven’t already, visit those links and read what they are saying. I’m not very optimistic about it, but I’ll do whatever I can to support their efforts.
And that brings us to the other thing that made me sad these days. 2 days ago, the CSS WG published its Minutes (sorta like a meeting) and I was surprised to hear that I’ve been mentioned. My surprise quickly turned into this painful feeling in your stomach when you’re being unfairly accused:
tantek: Opposite is happening right now. Web standards activists are teaching people to use -webkit- tantek: People like Lea Verou. tantek: Their demos are filled with -webkit-. You will see presentations from all the web standards advocates advocating people to use -webkit- prefixes.
Try to picture being blamed of the very thing you hate, and you might understand how that felt. I’ve always been an advocate of inclusive CSS coding that doesn’t shut down other browsers. It’s good for future-proofing, it’s good for competition and it’s the right thing to do. Heck, I even made a popular script to help people adding all prefixes! I’m even one of the few people in the industry who has never expressed a definite browser preference. I love and hate every browser equally, as I can see assets and defects in all of them (ok, except Safari. Safari must die :P).
When Tantek realized he had falsely accused me of this, he corrected himself in the #css IRC room on w3.org:
\[17:27\] <tantek> (ASIDE: regarding using -webkit- prefix, clarification re: Lea Verou - she's advocated using \*both\* vendor prefixed properties (multiple vendors) and the unprefixed version after them. See her talk http://www.slideshare.net/LeaVerou/css3-a-practical-introduction-ft2010-talk from Front-Trends 2010 for example. An actual example of -webkit- \*only\* prefix examples (thus implied advocacy) is Google's http://slides.html5rocks.com/ , e.g.
\[17:27\] <tantek> http://slides.html5rocks.com/#css-columns has three -webkit- property declarations starting with -webkit-column-count )
That’s nice of him, and it does help. At least I had a link to give to people who kept asking me on twitter if I was really the prefix monster he made me out to be. :P The problem is that not many read the IRC logs, but many more read the www-style archives. Especially since, with all this buzz, many people were directed into reading this discussion by the above articles. I don’t know how many people will be misled by Tantek’s uninformed comment without reading his correction, but I know for sure that the number is non-zero. And the worst of all is that many of them are people in the CSSWG or in the W3C in general, people who I have great respect and admiration for. And quite frankly, that sucks.
I don’t think Tantek had bad intentions. I’ve met him multiple times and I know he’s a nice guy. Maybe he was being lazy by making comments he didn’t check, but that’s about it. It could happen to many people. My main frustration is that it feels there is nothing I can do about it, besides answering people when they take the time to talk to me about it. I can do nothing with the ones that won’t, and that’s the majority. At least, if a forum was used over a mailing list, this could’ve been edited or something.
Vendor prefixes, the CSS WG and me
The CSS Working Group is recently discussing the very serious problem that vendor prefixes have become. We have reached a point where browsers are seriously considering to implement -webkit- prefixes, just because authors won’t bother using anything else. This is just sad. :( Daniel Glazman, Christian Heilmann and others wrote about it, making very good points and hoping that authors will wake up and start behaving. If you haven’t already, visit those links and read what they are saying. I’m not very optimistic about it, but I’ll do whatever I can to support their efforts.
And that brings us to the other thing that made me sad these days. 2 days ago, the CSS WG published its Minutes (sorta like a meeting) and I was surprised to hear that I’ve been mentioned. My surprise quickly turned into this painful feeling in your stomach when you’re being unfairly accused:
tantek: Opposite is happening right now. Web standards activists are teaching people to use -webkit- tantek: People like Lea Verou. tantek: Their demos are filled with -webkit-. You will see presentations from all the web standards advocates advocating people to use -webkit- prefixes.
Try to picture being blamed of the very thing you hate, and you might understand how that felt. I’ve always been an advocate of inclusive CSS coding that doesn’t shut down other browsers. It’s good for future-proofing, it’s good for competition and it’s the right thing to do. Heck, I even made a popular script to help people adding all prefixes! I’m even one of the few people in the industry who has never expressed a definite browser preference. I love and hate every browser equally, as I can see assets and defects in all of them (ok, except Safari. Safari must die :P).
When Tantek realized he had falsely accused me of this, he corrected himself in the #css IRC room on w3.org:
\[17:27\] <tantek> (ASIDE: regarding using -webkit- prefix, clarification re: Lea Verou - she's advocated using \*both\* vendor prefixed properties (multiple vendors) and the unprefixed version after them. See her talk http://www.slideshare.net/LeaVerou/css3-a-practical-introduction-ft2010-talk from Front-Trends 2010 for example. An actual example of -webkit- \*only\* prefix examples (thus implied advocacy) is Google's http://slides.html5rocks.com/ , e.g.
\[17:27\] <tantek> http://slides.html5rocks.com/#css-columns has three -webkit- property declarations starting with -webkit-column-count )
That’s nice of him, and it does help. At least I had a link to give to people who kept asking me on twitter if I was really the prefix monster he made me out to be. :P The problem is that not many read the IRC logs, but many more read the www-style archives. Especially since, with all this buzz, many people were directed into reading this discussion by the above articles. I don’t know how many people will be misled by Tantek’s uninformed comment without reading his correction, but I know for sure that the number is non-zero. And the worst of all is that many of them are people in the CSSWG or in the W3C in general, people who I have great respect and admiration for. And quite frankly, that sucks.
I don’t think Tantek had bad intentions. I’ve met him multiple times and I know he’s a nice guy. Maybe he was being lazy by making comments he didn’t check, but that’s about it. It could happen to many people. My main frustration is that it feels there is nothing I can do about it, besides answering people when they take the time to talk to me about it. I can do nothing with the ones that won’t, and that’s the majority. At least, if a forum was used over a mailing list, this could’ve been edited or something.