Fix invisible text selection inside pre blocks (#3096)

This commit is contained in:
Christian González authored and GitHub committed 2026-09-18 20:55:04 +02:00
1 parent 0d39308ac2
commit 2b99ed5d38
3 files changed
+13

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Fix invisible text selection inside `pre` blocks in light mode
+1
View File
@@ -747,6 +747,7 @@ $code-font-size: $font-size-reative-sm !default;
$pre-padding: 1rem !default; $pre-padding: 1rem !default;
$pre-bg: var(--bg-surface-dark) !default; $pre-bg: var(--bg-surface-dark) !default;
$pre-color: var(--light) !default; $pre-color: var(--light) !default;
$pre-selection-bg: color-transparent(var(--primary), 0.4) !default;
$kbd-padding-x: 0.5rem !default; $kbd-padding-x: 0.5rem !default;
$kbd-padding-y: 0.25rem !default; $kbd-padding-y: 0.25rem !default;
+7
View File
@@ -136,6 +136,13 @@ pre {
@include scrollbar(); @include scrollbar();
// pre keeps its dark surface in both color schemes, so the light-mode
// selection tint (10% primary) is invisible here - use the dark-mode value
&::selection,
::selection {
background-color: $pre-selection-bg;
}
code { code {
padding: 0; padding: 0;
background: transparent; background: transparent;