LibWeb: Change default :focus-visible outline to a solid accent color

This commit is contained in:
Jelle Raaijmakers 2025-06-13 14:13:54 +02:00 committed by Alexander Kalenik
commit a321eca9d7
Notes: github-actions[bot] 2025-06-13 15:40:14 +00:00

View file

@ -579,9 +579,9 @@ Optional<BordersData> borders_data_for_outline(Layout::Node const& layout_node,
{ {
CSS::LineStyle line_style; CSS::LineStyle line_style;
if (outline_style == CSS::OutlineStyle::Auto) { if (outline_style == CSS::OutlineStyle::Auto) {
// `auto` lets us do whatever we want for the outline. 2px of the link colour seems reasonable. // `auto` lets us do whatever we want for the outline. 2px of the accent colour seems reasonable.
line_style = CSS::LineStyle::Dotted; line_style = CSS::LineStyle::Solid;
outline_color = CSS::CSSKeywordValue::create(CSS::Keyword::Linktext)->to_color(*static_cast<Layout::NodeWithStyle const*>(&layout_node)); outline_color = CSS::CSSKeywordValue::create(CSS::Keyword::Accentcolor)->to_color(*static_cast<Layout::NodeWithStyle const*>(&layout_node));
outline_width = 2; outline_width = 2;
} else { } else {
line_style = CSS::keyword_to_line_style(CSS::to_keyword(outline_style)).value_or(CSS::LineStyle::None); line_style = CSS::keyword_to_line_style(CSS::to_keyword(outline_style)).value_or(CSS::LineStyle::None);