Fix newlines in catalog [code] blocks, and add background color. #263

This commit is contained in:
ccd0 2014-12-31 19:55:24 -08:00
parent 3b1c585eb4
commit e1222d5d4b
4 changed files with 16 additions and 1 deletions

View File

@ -357,7 +357,9 @@ Build =
for exif in $$ '.abbr, .exif', root.lastElementChild
$.rm exif
for pp in $$ '.prettyprint', root.lastElementChild
$.replace pp, $.tn pp.textContent
cc = $.el 'span', className: 'catalog-code'
$.add cc, [pp.childNodes...]
$.replace pp, cc
for br in $$ 'br', root.lastElementChild when br.previousSibling?.nodeName is 'BR'
$.rm br

View File

@ -33,6 +33,11 @@
background-color: #DDD;
}
/* Catalog */
:root.photon .catalog-code {
background-color: rgba(150, 150, 150, 0.2);
}
/* Quote */
:root.photon .backlink.deadlink {
color: #F60 !important;

View File

@ -666,6 +666,11 @@ div[data-checked="false"] > .suboption-list {
.catalog-thread > .comment > b {
font-weight: normal;
}
.catalog-code {
background-color: #FFF;
display: inline-block;
max-width: 100%;
}
/* Announcement Hiding */
:root.hide-announcement #globalMessage {

View File

@ -34,6 +34,9 @@
:root.tomorrow .catalog-thread > .comment > span.quote {
color: #B5BD68;
}
:root.tomorrow .catalog-code {
background-color: rgba(255, 255, 255, 0.1);
}
/* Quote */
:root.tomorrow .backlink.deadlink {