From db0fc5a55e797044c5e404f301f12dba9969e4d8 Mon Sep 17 00:00:00 2001 From: bptato Date: Tue, 15 Oct 2024 17:21:57 +0200 Subject: css: add reverse video extension Called -cha-reverse. Mostly to solve the problem that code tags are indistinguishable from regular text - on a graphical browser this is normally served by monospace font, but we always use monospace... So now the default ua.css adds reverse video to code and xmp. pre remains as it was, because it means "preformatted", not "monospaced". Also, it would mess with our whatever-to-HTML converter output. --- src/layout/renderdocument.nim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/layout/renderdocument.nim') diff --git a/src/layout/renderdocument.nim b/src/layout/renderdocument.nim index 5ea01b8a..0dafc25c 100644 --- a/src/layout/renderdocument.nim +++ b/src/layout/renderdocument.nim @@ -66,6 +66,8 @@ func toFormat(computed: CSSComputedValues): Format = flags.incl(ffStrike) if TextDecorationBlink in computed{"text-decoration"}: flags.incl(ffBlink) + if TextDecorationReverse in computed{"text-decoration"}: + flags.incl(ffReverse) return Format( #TODO this ignores alpha; we should blend somewhere. fgcolor: computed{"color"}.cellColor(), -- cgit