fix(css): keep pre, code, kbd, samp selectable globally
After the app-wide `user-select: none` on body, content the user legitimately needs to copy stopped being selectable: HiFi Wizard commands and paths, snap/flatpak/Pulse/PipeWire setup blocks in Settings, graphics recovery commands, environment-variable hints, log viewers, keyboard shortcut chips. The HTML5 elements that wrap literal text — `pre`, `code`, `kbd`, `samp` — are already the right escape hatch and every wizard/settings/logs block in the codebase uses them. Adding a single rule alongside the existing form-input exception restores selection everywhere it matters without scattering `.selectable` classes through the views. cc
This commit is contained in:
1 file changed
+12
+12
@@ -1563,6 +1563,18 @@ textarea,
|
||||
-webkit-user-select: text;
|
||||
}
|
||||
|
||||
/* Semantic literal-text elements stay selectable everywhere. Covers the
|
||||
HiFi Wizard command/path blocks, recovery commands, environment-variable
|
||||
hints, log viewers, keyboard-shortcut chips, and any other place where
|
||||
users need to copy text verbatim from settings, diagnostics, or modals. */
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
}
|
||||
|
||||
/* Escape hatch: add class="selectable" to any element whose text users
|
||||
should be able to copy (error messages, tokens, release notes, etc.). */
|
||||
.selectable,
|
||||
|
||||
Reference in new issue
Block a user