From e0ef8baa10b906bdaf83fe82bc651d1aa129e70c Mon Sep 17 00:00:00 2001 From: Marcus Date: Mon, 15 Jul 2024 13:06:42 -0700 Subject: [PATCH] use pseudo for separating line --- src/features/tweaks/caught_up_line.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/features/tweaks/caught_up_line.js b/src/features/tweaks/caught_up_line.js index b0ab92ee7..88e4ca6a9 100644 --- a/src/features/tweaks/caught_up_line.js +++ b/src/features/tweaks/caught_up_line.js @@ -9,16 +9,20 @@ const borderAttribute = 'data-tweaks-caught-up-line-border'; const styleElement = buildStyle(` [${hiddenAttribute}] > div { display: none; } [${borderAttribute}] > div { - box-sizing: content-box; height: 0px; overflow-y: hidden; - border-top: 4px solid rgb(var(--white-on-dark)); + } + [${borderAttribute}]::before { + display: block; + height: 4px; + + background-color: rgb(var(--white-on-dark)); + content: ""; } @media (max-width: 540px) { - [${borderAttribute}] > div { - margin-top: 2px; - border-bottom: 2px solid transparent; + [${borderAttribute}]::before { + margin: 2px 0; } } `);