ladybird/Tests/LibWeb/Ref/expected/selection-default-link-ref.html
Jelle Raaijmakers d819152b4e LibGfx+LibWeb: Preserve text color for selections
Selecting text without custom ::selection styling changed the
foreground color of the selected content. This was especially visible
for links, where the text changed color but the underline did not.

The default selection style supplied both a selection background and a
foreground color from the palette or HighlightText system color. That
made ordinary selections behave as if the page had explicitly styled
::selection color.

Only provide a default selection background, so selected content keeps
its own foreground color unless CSS overrides it. Remove the now-unused
SelectionText palette role.
2026-06-18 22:43:26 +02:00

14 lines
269 B
HTML

<!DOCTYPE html>
<style>
td {
font-size: 20px;
line-height: 1.5;
}
.selected {
background: rgba(101, 2, 0, 0.8);
color: #000000;
text-decoration: none;
}
</style>
<table><tr><td><span class="selected">Default link selection</span></td></tr></table>