Posts in the Tech Category

Reworked Reset

Published 18 years, 7 months past

Here’s the latest version of my “baseline” style sheet, with some changes based on feedback from readers on the original post.

/* Don't forget to set a foreground and background color 
   on the 'html' or 'body' element! */
html, body, div, span,
applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dd, dl, dt, li, ol, ul,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	line-height: 1;
	font-family: inherit;
	text-align: left;
	vertical-align: baseline;
}
a img, :link img, :visited img {
	border: 0;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}
ol, ul {
	list-style: none;
}
q:before, q:after,
blockquote:before, blockquote:after {
	content: "";
}

The changes are:

  1. The leading comment — rather than fill in some default document colors, which I hesitate to do given how often they’ll be changed, I just threw in a comment reminding the author that setting them is a good idea.  I’d expect that anyone who uses their own set of baseline styles will fill in their own favorite color set.

  2. font-weight: inherit; — this used to be normal, but it was pointed out that this would upset normal inheritance.  For example, if you set a div to be boldfaced, none of its descendant elements would inherit that boldness (because they’d be explicitly assigned normal).  Using inherit avoids this problem while still “zeroing out” boldface styling.

  3. font-style: inherit — same reasoning.

  4. vertical-align: baseline — this brings everything onto the baseline, including superscripts and subscripts.  This forces authors to determine the exact vertical offset they want for such elements, as well as any others they might care to vertically shift, as well as how they’ll accomplish said shift(s).

  5. a img, :link img, :visited img — this will make sure images in anchors and links don’t have a border by default.  Using a img covers images in named anchors, while the rest of the selector handles images inside either visited or unvisited links.  You might consider a img to be sufficient, and for now you’d be right.  But in the future, any element may be a link, not just a elements, so this gives us a bit of future-proofing.

I also put some spaces into the selectors to make them easier for me to read.  If you use these styles, you might consider stripping out the unnecessary whitespace to compact the rules as much as possible.

It was suggested that min-width: 0; be added to the first rule in order to invoke hasLayout, but Ingo Chao explained why that was a bad idea.  It was also suggested that text decorations should be removed from links, but I’d rather not.  I try never to mess with link decorations, and also figure that anyone who feels otherwise can add their own text-decoration declarations.

So we’ll see how well this one stands up to use in the wild.  Let me know!


Reset Styles

Published 18 years, 7 months past

At AEA Boston, I advocated using a “reset” or “baseline” set of styles, but not one based on the universal selector.  Instead, I said the styles should list all the actual elements to be reset and exactly how they should be reset.  During the Q&A afterward, an audience member asked me if I would create such a style sheet to share with the world, and I said that I would.

Then, during the break, someone else (sorry I’ve forgotten who!) reminded me that the Yahoo! UI group already did it with reset.css so I don’t have to.  Awesome!

…except that I don’t think it goes far enough in some areas, and a little too far in others.  So here’s my version of reset.css, based off of the YUI styles.

html,body,div,span,
applet,object,iframe,
h1,h2,h3,h4,h5,h6,p,blockquote,pre,
a,abbr,acronym,address,big,cite,code,
del,dfn,em,font,img,ins,kbd,q,s,samp,
small,strike,strong,sub,sup,tt,var,
dd,dl,dt,li,ol,ul,
fieldset,form,label,legend,
table,caption,tbody,tfoot,thead,tr,th,td {
	margin: 0;
	padding: 0;
	border: 0;
	font-weight: normal;
	font-style: normal;
	font-size: 100%;
	line-height: 1;
	font-family: inherit;
	text-align: left;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}
ol,ul {
	list-style: none;
}
q:before,q:after,
blockquote:before,blockquote:after {
	content: "";
}

I omitted elements like hr and the various frame-related elements, as well as form elements like input and select, because of their general weirdness, though I may change my mind about those at a later date.  I intentionally left out dir and menu because of their deprecated status.

I’m absolutely open to questions, comments, and suggestions, so feel free to use the comments for that purpose.

(Side note: if anyone’s disturbed by the unitless value for line-height, please read my post “Unitless line-heights“.)

Addendum: There have been some good suggestions in the comments, so they’re definitely worth reading.  See also the followup post, which incorporates some of those suggestions.


Stylish Spam

Published 18 years, 8 months past

From my comment queue, possibly the first time I feel a spammer is really speaking to me as a person:

Did u ever heard about CSS…? it will help your site.

Do tell, oh random anonymous stranger whose site URL crudely references the genitalia of older females!  I wish to learn.


After Boston

Published 18 years, 8 months past

Wow.

Just wow.

I’m back home and I still can’t believe how amazing An Event Apart Boston was for me and everyone with whom I talked.  I knew going in it was a great lineup of speakers covering great topics.  I knew that we had a completely kick-ass staff in place, and amazing volunteers to help us out.  I knew that we’d have great support from the venue.

I knew all that, and I was still overwhelmed and ecstatic at how things went.  At least on one level.  On another, thanks to the aforementioned kick-ass staff, things went so smoothly that I almost felt like I was a speaker at someone else’s conference.  I had so little to worry about that it was sometimes hard to remember that this was all happening because Jeffrey and I, over breakfast at Las Manitas in Austin, decided to take a chance and put on a show.  In a way, I had to prod myself just a little to remember to feel pride in what we’d accomplished.

What required no effort to feel was a deep sense of humility and awe that so many people had come to support what we did.  Over five hundred folks gathered in Boston, drawn by the same love of the web and pride in Doing Things Right that drives us.  I see the attendees at AEA as the craftsmen and women of the web.  Sure, there are shops mass-producing sites, the way a factory churns out cheap clocks.  That’s fine if you just want something to put on your nightstand.  But if you want an elegant, finely tuned work of art that you’d hang in a prominent place, a clock that is as much a point of pride as a timepiece—you find a craftsman.  And that’s who came to Boston.  That’s who comes to An Event Apart.

What amazed me even more was the overwhelming wave of positive feedback that we got.  Marci, our event manager, told me that in 25 years of event planning, she’s never seen attendees so happy.  So many people came up to me and Jeffrey and Marci just to say, “Thank you so much for doing this”.  They were thanking us, which seems entirely backwards.  I did thank each of them for coming to the event, but let me state it here for anyone I didn’t get to thank in person.  Thank you so much for coming to AEA and showing that you know creating the web is much more than churning out code, and that you take pride in being a craftsman.  Thank you for making the show so amazing.  Without you, it couldn’t have happened at all.

Now I’m looking forward to AEA Seattle twice as much as before, and I thought I was already maxed out on anticipation.

Again: wow.  Thank you, one and all.


AEA Seattle 2007 Now Open

Published 18 years, 8 months past
Limited seating is now available for An Event Apart Seattle 2007, June 21-22, at Bell Harbor International Conference Center on breathtaking Puget Sound. Spend two days with leading designers, developers, and accessibility experts including (in alphabetical order)…
  • Tim Bray, father of XML, director of web technologies at Sun Microsystems, and Tim Berners-Lee W3C appointee;
  • Andy Budd, user experience lead at Clearleft, co-founder of d.Construct, and author of CSS Mastery: Advanced Web Standards Solutions;
  • Mike Davidson, founder and CEO of Newsvine, former art director and manager of media product development for ESPN and the Walt Disney Internet Group;
  • Shawn Henry, director of education outreach for W3C Web Accessibility Initiative (WAI), research appointee at the MIT Computer Science and Artificial Intelligence Laboratory, and author of Just Ask: Integrating Accessibility Throughout Design;
  • Shaun Inman, award-winning designer and developer, inventor of Inman Flash Replacement and the curiously successful stats package Mint;
  • Jeffrey Veen, designer manager at Google, founding partner of Adaptive Path, and W3C invited expert on CSS before most of us knew the acronym;
  • Khoi Vinh, design director at NYTimes.com, author of Subtraction.com, and former partner at Behavior LLC;
…plus Jason Santa Maria, Eric Meyer, and Jeffrey Zeldman. A complete schedule is available for your perusal. The two days of design, code, and best practices, including lunch on both days and parties on both nights, go for $795 (reg. $895) if you register by May 21, 2007. An Event Apart Seattle 2007 will be our only show in the northwest this year. Seating is limited to 300 attendees and will sell out fast—they’re already going like hot cakes—so nudge that bean counter and come join us!

AEA Boston Full Up

Published 18 years, 9 months past

I’m sorry to be the bearer of bad news to any potential AEA Boston attendees, but we sold the last available seat just before noon yesterday.  You can still get in touch to request a spot on our waiting list. if you like.  If not, there’s always the Seattle show coming in June, with tentative plans for two more shows by the end of 2007.

Some of you may recall that I prophesied, a few weeks back, that we’d sell out on February 28th—and so we did.  Go me.  I feel like a regular Edgar Cayce.


Speaking Assistance

Published 18 years, 9 months past
  • MakeMeASpeaker

    This wiki is intended to be a place where those who are interested in becoming speakers (particularly, but not exclusively, in the web world) can come to get advice, mentoring and help. It is also intended to be a meeting place for those who are interested in helping others become speakers.

    On the same site: an evolving (and evolvable) page containing Advice.

  • UltraNormal: How to Get to Speak at Web Conferences

    …some practical suggestions for folks who want to gain some confidence in their own speaking abilities and how I worked up to presenting at conferences… I’ve spoken at a bunch of conferences over the past year, and well, this might help someone.

  • Bloggy Hell: Calling future speakers!

    Below are a list of some of the events which encourage people to get up and speak about what they love. The list is Australian-centric, mainly because that is the circles I hang with, but I would love to hear of similar things going on around the world…


Diverse Links

Published 18 years, 9 months past
  • mezzoblue: Homogeneity?

    There’s really nothing in the post I don’t want to quote, but this bit in particular jumped out at me:

    …as a conference organizer, you tend to be conservative. You need to ensure a speaker list that will fill seats. This isn’t “we want to maximize profit” filling of seats either, this is “holy crap we just signed a contract that would put us out multiple tens of thousands of dollars if we don’t hit certain numbers”. When you book larger venues, you make commitments and really put yourself on the line financially. Those who haven’t run conferences simply can’t understand what a nerve-wracking experience this is.

  • Brian Oberkirch: Identity Is a Mashup

    This is an ongoing debate (as it has to be) though the argumentation tends toward the self-righteous, self-evident mode: look at all these white boys on the roster. What are they thinking? I think we can do better. I think we have to do better.

    On that post, a comment by Derek Powazek

    One of the reasons I got very excited about the internet when I discovered it in the 90s was because, finally, here was a place where race, gender, and religion truly did not matter. Where you could succeed or fail on the strength of your ideas alone – not what color you were or what junk was in your pants.

    I still believe this to be true.

  • Hamm on Wry: Post Gender Preferences

    I don’t see how being male, female, white, black, brown, purple, queer, asexual, cancerous, capricorn or a carrot would matter if you happen to also be a professional in the web-standards-meets-development world. I would, honestly, attend a speech given by a carrot if that carrot was recognized as a leader in the field. That’s what professional speeches are all about.

  • Jason Friesen {dot} ca: Diversity Wars

    To me, this is the key to being race- and gender-neutral — actually not caring about a person’s race or gender, but simply whether they can contribute what is needed in a given situation.

  • Adactio: The diversity division

    I firmly believe that conferences shouldn’t simply be mirrors for the Web business, reflecting whatever is current and accepted. A good conference can act as a force on the industry. Conference organisers have a great opportunity here and I think it’s a shame to see it wasted.

  • Digital Web Magazine: Beyond the A-List, Diversity in the Web Community

    I am going to go out on a limb here and use smart mob mentality here. If you know of a web professional who is talented, has done some remarkable things, and should be speaking at some web design conferences by all means let us know…

  • Meri Williams: Conference Diversity .. the Permathread Returns

    You never know, we might just change the world.


Browse the Archive

Earlier Entries

Later Entries