Should we standardize a pseudo-CSS property for "reverse video"?

OK, I think I’ve got an argument that will settle it in favor of -someprefix-reverse-video.

In the CSS Basic proposal, we’re proposing that text-decoration: underline be supported.

If we support text-decoration: reverse, then we’d have to support text-decoration: underline reverse, which browsers do not support.

<!DOCTYPE html>
<head>
<style>
    body {
        text-decoration: underline reverse;
    }
</style>
</head>
<body>
    hello
</body>

In browsers, the entire text-decoration rule is skipped when an unrecognized term appears, so, in this example, “hello” appears without underline. The use of reverse broke the whole rule.

(It doesn’t matter whether you call it reverse or -intfiction-reverse-video; any unrecognized term skips the whole rule.)

Whereas if we use a custom property, the underlining works as expected in browsers. The unrecognized rule is skipped, but the recognized rule is not skipped.

text-decoration: underline;
-intfiction-reverse-video: reverse;

So, those prefixes:

  • -if- (or -IF-…?)
  • -iftf-
  • -intfiction-
2 Likes