From 302e51fdc9e921eda6b52eff00dc102ea2e27514 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez <guillaume1.gomez@gmail.com> Date: Sun, 30 Jul 2017 15:11:15 +0200 Subject: [PATCH 1/6] Add colors for constants and unions --- src/librustdoc/html/static/rustdoc.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 567c8fb9718..9d237bba1bc 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -438,6 +438,8 @@ a { .content span.struct, .content a.struct, .block a.current.struct { color: #df3600; } .content span.type, .content a.type, .block a.current.type { color: #e57300; } .content span.macro, .content a.macro, .block a.current.macro { color: #068000; } +.content span.union, .content a.union, .block a.current.union { color: #c0c74f; } +.content span.constant, .content a.constant, .block a.current.constant { color: #c7944f; } .block a.current.crate { font-weight: 500; } .search-input { From 1072891b7650f4c4d687ef8032d29638ef5b8f85 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez <guillaume1.gomez@gmail.com> Date: Wed, 2 Aug 2017 23:00:35 +0200 Subject: [PATCH 2/6] Improve color theme for color blind issues --- src/librustdoc/html/static/rustdoc.css | 6 ------ src/librustdoc/html/static/styles/main.css | 8 +++++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 9d237bba1bc..e100b0e1b43 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -434,12 +434,6 @@ a { text-decoration: underline; } -.content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; } -.content span.struct, .content a.struct, .block a.current.struct { color: #df3600; } -.content span.type, .content a.type, .block a.current.type { color: #e57300; } -.content span.macro, .content a.macro, .block a.current.macro { color: #068000; } -.content span.union, .content a.union, .block a.current.union { color: #c0c74f; } -.content span.constant, .content a.constant, .block a.current.constant { color: #c7944f; } .block a.current.crate { font-weight: 500; } .search-input { diff --git a/src/librustdoc/html/static/styles/main.css b/src/librustdoc/html/static/styles/main.css index c0310199088..53141142867 100644 --- a/src/librustdoc/html/static/styles/main.css +++ b/src/librustdoc/html/static/styles/main.css @@ -97,7 +97,13 @@ pre { border-bottom-color: #ddd; } -.content span.primitive, .content a.primitive, .block a.current.primitive { color: #39a7bf; } +.content span.enum, .content a.enum, .block a.current.enum { color: #508157; } +.content span.struct, .content a.struct, .block a.current.struct { color: #df3600; } +.content span.type, .content a.type, .block a.current.type { color: #ba5d00; } +.content span.macro, .content a.macro, .block a.current.macro { color: #068000; } +.content span.union, .content a.union, .block a.current.union { color: #767b27; } +.content span.constant, .content a.constant, .block a.current.constant { color: #9a6e31; } +.content span.primitive, .content a.primitive, .block a.current.primitive { color: #2c8093; } .content span.externcrate, .content span.mod, .content a.mod, .block a.current.mod { color: #4d76ae; } .content span.fn, .content a.fn, .block a.current.fn, From 971ef720248564c6a8f5ffde90398f931ed210d5 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez <guillaume1.gomez@gmail.com> Date: Wed, 2 Aug 2017 23:09:41 +0200 Subject: [PATCH 3/6] Improve functions --- src/librustdoc/html/static/styles/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/html/static/styles/main.css b/src/librustdoc/html/static/styles/main.css index 53141142867..2989d170b07 100644 --- a/src/librustdoc/html/static/styles/main.css +++ b/src/librustdoc/html/static/styles/main.css @@ -109,7 +109,7 @@ pre { .content span.fn, .content a.fn, .block a.current.fn, .content span.method, .content a.method, .block a.current.method, .content span.tymethod, .content a.tymethod, .block a.current.tymethod, -.content .fnname { color: #8c6067; } +.content .fnname { color: #546e8a; } pre.rust .comment { color: #8E908C; } pre.rust .doccomment { color: #4D4D4C; } From 26d124ca0eb6fe2fce5aa0541b269be27473d0b9 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez <guillaume1.gomez@gmail.com> Date: Thu, 3 Aug 2017 12:46:35 +0200 Subject: [PATCH 4/6] Invert constant and function color --- src/librustdoc/html/static/styles/main.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/styles/main.css b/src/librustdoc/html/static/styles/main.css index 2989d170b07..63e7510b22e 100644 --- a/src/librustdoc/html/static/styles/main.css +++ b/src/librustdoc/html/static/styles/main.css @@ -102,14 +102,14 @@ pre { .content span.type, .content a.type, .block a.current.type { color: #ba5d00; } .content span.macro, .content a.macro, .block a.current.macro { color: #068000; } .content span.union, .content a.union, .block a.current.union { color: #767b27; } -.content span.constant, .content a.constant, .block a.current.constant { color: #9a6e31; } +.content span.constant, .content a.constant, .block a.current.constant { color: #546e8a; } .content span.primitive, .content a.primitive, .block a.current.primitive { color: #2c8093; } .content span.externcrate, .content span.mod, .content a.mod, .block a.current.mod { color: #4d76ae; } .content span.fn, .content a.fn, .block a.current.fn, .content span.method, .content a.method, .block a.current.method, .content span.tymethod, .content a.tymethod, .block a.current.tymethod, -.content .fnname { color: #546e8a; } +.content .fnname { color: #9a6e31; } pre.rust .comment { color: #8E908C; } pre.rust .doccomment { color: #4D4D4C; } From 66317a39a651560bbd77fa3cac984e7e0ac580c0 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez <guillaume1.gomez@gmail.com> Date: Thu, 3 Aug 2017 22:55:17 +0200 Subject: [PATCH 5/6] Update highlight colors --- src/librustdoc/html/static/styles/main.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/styles/main.css b/src/librustdoc/html/static/styles/main.css index 63e7510b22e..16962811ea0 100644 --- a/src/librustdoc/html/static/styles/main.css +++ b/src/librustdoc/html/static/styles/main.css @@ -74,8 +74,9 @@ pre { .content .highlighted.mod { background-color: #afc6e4; } .content .highlighted.enum { background-color: #b4d1b9; } .content .highlighted.struct { background-color: #e7b1a0; } -.content .highlighted.fn { background-color: #c6afb3; } -.content .highlighted.method { background-color: #c6afb3; } +.content .highlighted.union { background-color: #b7bd49; } +.content .highlighted.fn, +.content .highlighted.method, .content .highlighted.tymethod { background-color: #c6afb3; } .content .highlighted.type { background-color: #c6afb3; } From 00b362e332219e14c6516df622b0749be77b2ff9 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez <guillaume1.gomez@gmail.com> Date: Sun, 6 Aug 2017 13:34:24 +0200 Subject: [PATCH 6/6] Fix invalid background highlights and add missing colors --- src/librustdoc/html/static/styles/main.css | 43 ++++++++++++---------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/src/librustdoc/html/static/styles/main.css b/src/librustdoc/html/static/styles/main.css index 16962811ea0..034c5307fc0 100644 --- a/src/librustdoc/html/static/styles/main.css +++ b/src/librustdoc/html/static/styles/main.css @@ -64,22 +64,6 @@ pre { background-color: #f6fdb0 !important; } -:target { background: #FDFFD3; } -.content .highlighted { - color: #000 !important; - background-color: #ccc; -} -.content .highlighted a, .content .highlighted span { color: #000 !important; } -.content .highlighted.trait { background-color: #fece7e; } -.content .highlighted.mod { background-color: #afc6e4; } -.content .highlighted.enum { background-color: #b4d1b9; } -.content .highlighted.struct { background-color: #e7b1a0; } -.content .highlighted.union { background-color: #b7bd49; } -.content .highlighted.fn, -.content .highlighted.method, -.content .highlighted.tymethod { background-color: #c6afb3; } -.content .highlighted.type { background-color: #c6afb3; } - .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 { border-bottom-color: #DDD; } @@ -98,15 +82,38 @@ pre { border-bottom-color: #ddd; } +:target { background: #FDFFD3; } +.content .highlighted { + color: #000 !important; + background-color: #ccc; +} +.content .highlighted a, .content .highlighted span { color: #000 !important; } +.content .highlighted.trait { background-color: #c7b6ff; } +.content .highlighted.mod, +.content .highlighted.externcrate { background-color: #afc6e4; } +.content .highlighted.enum { background-color: #b4d1b9; } +.content .highlighted.struct { background-color: #e7b1a0; } +.content .highlighted.union { background-color: #b7bd49; } +.content .highlighted.fn, +.content .highlighted.method, +.content .highlighted.tymethod { background-color: #c6afb3; } +.content .highlighted.type { background-color: #ffc891; } +.content .highlighted.macro { background-color: #8ce488; } +.content .highlighted.constant, +.content .highlighted.static { background-color: #c3e0ff; } +.content .highlighted.primitive { background-color: #9aecff; } + .content span.enum, .content a.enum, .block a.current.enum { color: #508157; } .content span.struct, .content a.struct, .block a.current.struct { color: #df3600; } .content span.type, .content a.type, .block a.current.type { color: #ba5d00; } .content span.macro, .content a.macro, .block a.current.macro { color: #068000; } .content span.union, .content a.union, .block a.current.union { color: #767b27; } -.content span.constant, .content a.constant, .block a.current.constant { color: #546e8a; } +.content span.constant, .content a.constant, .block a.current.constant, +.content span.static, .content a.static, .block a.current.static { color: #546e8a; } .content span.primitive, .content a.primitive, .block a.current.primitive { color: #2c8093; } .content span.externcrate, .content span.mod, .content a.mod, .block a.current.mod { color: #4d76ae; } +.content span.trait, .content a.trait, .block a.current.trait { color: #7c5af3; } .content span.fn, .content a.fn, .block a.current.fn, .content span.method, .content a.method, .block a.current.method, .content span.tymethod, .content a.tymethod, .block a.current.tymethod, @@ -137,8 +144,6 @@ a.test-arrow { color: #f5f5f5; } -.content span.trait, .content a.trait, .block a.current.trait { color: #7c5af3; } - .search-input { color: #555; box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;