From 788583ea23ecb1df9ffcb11681d6cd73d1573b28 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Fri, 1 Dec 2023 20:05:42 -0600 Subject: [PATCH] Update syntax styles to fix user-select Turns out the last commit didn't work because bobastyle.css has lower priority than the syntax CSS. But Hugo must've updated the styles upstream because it's fixed after regenerating. --- assets/css/bobastyle.css | 9 --------- assets/css/syntax-light.css | 9 +++++---- assets/css/syntax.css | 9 +++++---- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index d958c4c..baf1360 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -833,15 +833,6 @@ code { display: block; } /* fixes line numbers on firefox when there's only one line */ -.chroma .lnt, -.chroma .ln { - /* chroma sets the non-prefixed one only */ - user-select: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; -} - /* }}} */ /* Asides {{{ */ diff --git a/assets/css/syntax-light.css b/assets/css/syntax-light.css index c844311..acb4ae5 100644 --- a/assets/css/syntax-light.css +++ b/assets/css/syntax-light.css @@ -5,16 +5,17 @@ color: black; } -/* Background */ .bg { background-color: #f8f8f8 } +/* Background */ .bg { background-color: #f8f8f8; } /* PreWrapper */ .chroma { background-color: #f8f8f8; } /* Other */ .chroma .x { color: #000000 } /* Error */ .chroma .err { color: #a40000 } /* CodeLine */ .chroma .cl { } +/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit } /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } -/* LineHighlight */ .chroma .hl { background-color: #ffffcc } -/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } -/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* LineHighlight */ .chroma .hl { background-color: #dfdfdf } +/* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } /* Line */ .chroma .line { display: flex; } /* Keyword */ .chroma .k { color: #204a87; font-weight: bold } /* KeywordConstant */ .chroma .kc { color: #204a87; font-weight: bold } diff --git a/assets/css/syntax.css b/assets/css/syntax.css index ea567d6..f5c377a 100644 --- a/assets/css/syntax.css +++ b/assets/css/syntax.css @@ -1,15 +1,16 @@ /* native style */ -/* Background */ .bg { color: #d0d0d0; background-color: #202020 } +/* Background */ .bg { color: #d0d0d0; background-color: #202020; } /* PreWrapper */ .chroma { color: #d0d0d0; background-color: #202020; } /* Other */ .chroma .x { } /* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 } /* CodeLine */ .chroma .cl { } +/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit } /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } -/* LineHighlight */ .chroma .hl { background-color: #ffffcc } -/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 } -/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 } +/* LineHighlight */ .chroma .hl { background-color: #363636 } +/* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 } +/* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 } /* Line */ .chroma .line { display: flex; } /* Keyword */ .chroma .k { color: #6ab825; font-weight: bold } /* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }