From 2d9abe5d2239c65aa211a796ac621382922b2a32 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Thu, 13 Oct 2016 17:20:43 -0700 Subject: [PATCH] Restore hiding of extra linebreaks in catalog. #1150 Show them at reduced size on hover. --- src/General/Build.coffee | 3 +++ src/css/style.css | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/General/Build.coffee b/src/General/Build.coffee index bf7dbb308..371868821 100644 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -219,6 +219,9 @@ Build = container = $.el 'div', <%= readHTML('CatalogThread.html') %> $.before thread.OP.nodes.info, [container.childNodes...] + for br in $$('br', thread.OP.nodes.comment) when br.previousSibling and br.previousSibling.nodeName is 'BR' + $.addClass br, 'extra-linebreak' + root = $.el 'div', className: 'thread catalog-thread' id: "t#{thread}" diff --git a/src/css/style.css b/src/css/style.css index 63c932543..cb87bae07 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -827,9 +827,11 @@ div[data-checked="false"] > .suboption-list { .catalog-container:not(:hover) > * > .file, .catalog-container:not(:hover) > * > .postInfo > :not(.subject), .catalog-container:not(:hover) > * > .catalog-replies, +.catalog-container:not(:hover) .extra-linebreak, :root:not(.catalog-hover-expand) .catalog-container > * > .file, :root:not(.catalog-hover-expand) .catalog-container > * > .postInfo > :not(.subject), :root:not(.catalog-hover-expand) .catalog-container > * > .catalog-replies, +:root:not(.catalog-hover-expand) .catalog-container .extra-linebreak, .catalog-thread > .catalog-container > :not(.catalog-post), .catalog-post > .file > :not(.fileText), .catalog-post > * > .fileText > :not(:first-child), @@ -880,6 +882,11 @@ div[data-checked="false"] > .suboption-list { :root.catalog-hover-expand .catalog-container:hover > * > .postMessage:not(:empty) { padding-top: .3em; } +.catalog-post .extra-linebreak { + content: ''; /* makes this work in Blink/WebKit */ + display: block; + margin-top: .3em; +} .catalog-reply { text-align: left; white-space: nowrap;