diff options
author | phani00 <phani00@gmail.com> | 2018-12-17 15:28:15 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-12-22 19:52:39 +0100 |
commit | 66b56416b6ad40a682395d26398535508ef79022 (patch) | |
tree | 111f562c69c40290a6c96abf1dc91b9a0d28aa74 | |
parent | c85534635890dab0497977a5beb9aa17f4510821 (diff) | |
download | volse-hubzilla-66b56416b6ad40a682395d26398535508ef79022.tar.gz volse-hubzilla-66b56416b6ad40a682395d26398535508ef79022.tar.bz2 volse-hubzilla-66b56416b6ad40a682395d26398535508ef79022.zip |
new fix for dark theme
change implementation of hl-tags in include/bbcode.php
insert class='default-highlight' instead of background-color: 'yellow' into span
add span.default-highlight definition to view/theme/redbasic/css/style.css
this works for all schemas incl. dark.
(cherry picked from commit aace8a14cee2f173b7a11bb2bfcbcebbe0084863)
-rw-r--r-- | include/bbcode.php | 3 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 10 | ||||
-rw-r--r-- | view/theme/redbasic/schema/dark.css | 40 |
3 files changed, 28 insertions, 25 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index c5d6ef998..a0d41ccf0 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1021,7 +1021,8 @@ function bbcode($Text, $options = []) { } // Check for colored text if (strpos($Text,'[/hl]') !== false) { - $Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "<span style=\"background-color: yellow;\">$1</span>", $Text); + $Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "<span class=\"default-highlight\">$1</span>", $Text); +// $Text = preg_replace("(\[hl\](.*?)\[\/hl\])ism", "<span style=\"background-color: yellow;\">$1</span>", $Text); $Text = preg_replace("(\[hl=(.*?)\](.*?)\[\/hl\])ism", "<span style=\"background-color: $1;\">$2</span>", $Text); } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index f2c1b7a48..ba0cc7cd2 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1803,3 +1803,13 @@ dl.bb-dl > dd > li { .hover-fx-show:hover .hover-fx-hide { opacity: 1; } + +/* default highlighted text if not specified by schema: */ +span.default-highlight { + background-color: yellow; + color: #111; + margin: 0 2px; + padding: 2px 4px 2px 5px; + border-radius: 4px; + white-space: nowrap; +} diff --git a/view/theme/redbasic/schema/dark.css b/view/theme/redbasic/schema/dark.css index c00ddca90..a0b9b12d3 100644 --- a/view/theme/redbasic/schema/dark.css +++ b/view/theme/redbasic/schema/dark.css @@ -323,23 +323,6 @@ a, a:visited, a:link, .fakelink, .fakelink:visited, .fakelink:link { color: #aaa !important; } -/* phani: fix 1 */ -/*a.text-dark:focus, a.text-dark:hover { - color: #ddd !important; -} - -.badge-warning { - background-color: #ffc927; -} -.badge-warning a.text-dark { - color: #333 !important; -} -.badge-warning a.text-dark:focus, .badge-warning a.text-dark:hover { - color: red !important; - text-decoration: none; -}*/ - - .group-selected, .fileas-selected, .categories-selected, .search-selected, a.active { color: #fff !important; text-decoration: underline !important; @@ -495,10 +478,19 @@ pre { background-color: #222; } -/* phani: fix 2 */ -/* change color of [hl] tag: */ -/*div.wall-item-body span { - color: #1212b6; - padding: 2px 3px; - white-space: nowrap; -}*/ + +/* category badge fix: */ +a.text-dark:focus, a.text-dark:hover { + color: #ddd !important; +} + +.badge-warning { +/* background-color: #ffc927; */ +} +.badge-warning a.text-dark { + color: #333 !important; +} +.badge-warning a.text-dark:focus, .badge-warning a.text-dark:hover { + color: red !important; + text-decoration: none; +} |