From 54e464fb9897a2dce133b1ee4d23b181a14fd2e2 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Thu, 4 Mar 2010 16:54:48 -0800 Subject: Fix coloring of tab markers in syntax highlighting If syntax highlighting is enabled the visual tab markers might adopt the surrounding code's coloring due to prettify pushing its own CSS class inside of our vt span. Override all of the prettify classes when inside of a vt span with our own concept of the correct color. Change-Id: I15ed9eb7348d5c4fb26f98332caed0194c6daefe Signed-off-by: Shawn O. Pearce --- .../com/google/gerrit/prettify/client/gerrit.css | 41 +++++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) (limited to 'gerrit-prettify') diff --git a/gerrit-prettify/src/main/resources/com/google/gerrit/prettify/client/gerrit.css b/gerrit-prettify/src/main/resources/com/google/gerrit/prettify/client/gerrit.css index 85276ae1..3478e687 100644 --- a/gerrit-prettify/src/main/resources/com/google/gerrit/prettify/client/gerrit.css +++ b/gerrit-prettify/src/main/resources/com/google/gerrit/prettify/client/gerrit.css @@ -17,14 +17,36 @@ @external .vt; @external .wdd; @external .wdi; + +@external .str; +@external .kwd; +@external .com; +@external .typ; +@external .lit; @external .pun; +@external .pln; +@external .tag; +@external .atn; +@external .atv; +@external .dec; .wse { background: red; cursor: pointer; } -.vt { +.vt, +.vt .str, +.vt .kwd, +.vt .com, +.vt .typ, +.vt .lit, +.vt .pun, +.vt .pln, +.vt .tag, +.vt .atn, +.vt .atv, +.vt .dec { color: red; } @@ -39,10 +61,19 @@ * error. For these we want the whitespace error to take precedence * so we have to override the contained style. */ -.wse .vt, -.wdd .vt, -.wse .vt .pun, -.wdd .vt .pun { +.wse .vt, .wdd .vt, +.wse .vt .pun, .wdd .vt .pun, +.wse .vt .str, .wdd .vt .str, +.wse .vt .kwd, .wdd .vt .kwd, +.wse .vt .com, .wdd .vt .com, +.wse .vt .typ, .wdd .vt .typ, +.wse .vt .lit, .wdd .vt .lit, +.wse .vt .pun, .wdd .vt .pun, +.wse .vt .pln, .wdd .vt .pln, +.wse .vt .tag, .wdd .vt .tag, +.wse .vt .atn, .wdd .vt .atn, +.wse .vt .atv, .wdd .vt .atv, +.wse .vt .dec, .wdd .vt .dec { color: black; } .wse .wdd { -- cgit v1.2.3