Skip Navigation

One more property for the CSS wishlist

I’m guessing this is precisely the kind of thing that is possible with SVG and maybe even the <canvas> element, but I have, nonetheless, a little something more I’d like to see added to CSS’ arsenal of presentational properties. That is, besides the white-space: none declaration I mused on eighteen months ago: text-outline.

Text outlines add a colored stroke to the outside of each character in the text.

Simple, flexible, useful in all the same places as our old friend text-shadow and more… it takes the same range of values as the existing border and outline properties we have for block elements and applies them to type.

In fact, it seems reasonable to think that a complementary text-border property would be useful for the same reasons we have that aforementioned border/outline distinction on block elements in CSS. Borders contribute to the page flow, adding bulk to the elements they enclose (even if it is only a matter of pixels) while outlines do not… they add visual weight, but they do not add to the width or height of an element.

But I won’t hold my breath.