{"id":14117,"date":"2011-09-06T18:44:57","date_gmt":"2011-09-07T01:44:57","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=14117"},"modified":"2021-08-02T11:13:45","modified_gmt":"2021-08-02T18:13:45","slug":"text-stroke","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/t\/text-stroke\/","title":{"rendered":"text-stroke"},"content":{"rendered":"\n

text-stroke<\/code> is an experimental property that provides text decoration options similar to those found in Adobe Illustrator or other vector drawing applications. It is not currently included in any W3C<\/abbr> or WHATWG<\/abbr> specification. As of June 2013, it is only implemented behind a -webkit<\/code> vendor prefix, though future versions of Firefox and Internet Explorer may support the property (likely under their own prefixes).<\/p>\n\n\n\n

mark {\n  text-stroke: 2px red;\n}<\/code><\/pre>\n\n\n\n

The text-stroke<\/code> property is actually shorthand for two other properties:<\/p>\n\n\n\n

  1. text-stroke-width<\/code>, which takes unit value (1px, 0.125em, 4in, etcetera) and describes the thickness of the stroke effect.<\/li>
  2. text-stroke-color<\/code>, which takes a color value (hex, rgb\/rgba, hsl\/hsla, etcetera).<\/li><\/ol>\n\n\n\n

    text-stroke<\/code> also has a companion property, text-fill-color<\/code>, which will override the color<\/code> property, allowing for a graceful fallback to a different text color in browsers that do not support text-stroke<\/code>.<\/p>\n\n\n\n