As of Feb. 2016, CSS 3 has the support mentioned below. Here is a snippet from a WooCommerce's single product page with price discount
/*Price before discount on single product page*/body.single-product .price del .amount {color: hsl(0, 90%, 65%);font-size: 15px;text-decoration: line-through;/*noinspection CssOverwrittenProperties*/text-decoration: white double line-through; /* Ignored in CSS1/CSS2 UAs */}
CSS 3 will likely have direct support using the text-decoration-color
property. In particular:
The
text-decoration-color
CSS property sets the color used when drawing underlines, overlines, or strike-throughs specified bytext-decoration-line
. This is the preferred way to color these text decorations, rather than using combinations of other HTML elements.
Also see text-decoration-color
in the CSS 3 draft spec.
If you want to use this method immediately, you probably have to prefix it, using -moz-text-decoration-color
. (Also specify it without -moz-
, for forward-compatibility.)