From 6c0a1212508107183886ca5550646ca9acd50a5c Mon Sep 17 00:00:00 2001 From: tdro Date: Tue, 30 May 2023 18:24:56 -0400 Subject: assets/css/syntax-highlight-default: Position relative Let descending highlights/hovers absorb width --- assets/css/default.css | 9 +++++++-- assets/css/syntax-highlight-default.css | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/assets/css/default.css b/assets/css/default.css index c1a7830..a455952 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -125,8 +125,7 @@ outline: 2px dashed var(--border-darker); } -pre:focus-within, -:focus:not(html):not(body):not(svg), +:focus:not(html):not(body):not(svg):not(pre), sup:target [role="doc-noteref"][href^="#fn\:"], li:target [role="doc-backlink"][href^="#fnref\:"] { outline: 0.15rem solid; @@ -134,6 +133,12 @@ li:target [role="doc-backlink"][href^="#fnref\:"] { text-decoration: none; } +pre:focus, +pre:focus-within { + outline: 0.15rem solid; + text-decoration: none; +} + sup:target [role="doc-noteref"][href^="#fn\:"], li:target [role="doc-backlink"][href^="#fnref\:"], :focus:not(html):not(body):not(pre):not(svg):not(button):not(input):not(video) { diff --git a/assets/css/syntax-highlight-default.css b/assets/css/syntax-highlight-default.css index cf490bb..e6f7021 100644 --- a/assets/css/syntax-highlight-default.css +++ b/assets/css/syntax-highlight-default.css @@ -22,10 +22,11 @@ } .chroma .ln a { - padding: 0.2rem 0.75rem; + padding: 0.05rem 0.75rem; margin: 0 1rem 0 -0.75rem; user-select: none; text-decoration: none; + display: inline-block; } .chroma .ln a:hover, @@ -44,6 +45,10 @@ background-color: #f2f2f2; } +code-block code { + position: relative; +} + code-block button { border: 1px solid #ccc; } -- cgit v1.2.3