mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-09 12:42:54 +00:00
LibHTML: Respect the link color set via <body link>
The default style for "a" tags now has { color: -libhtml-link; }. We implement this vendor-specific property by querying the containing document for the appropriate link color. Currently we only use the basic link color, but in the future this can be extended to remember visited links, etc.
This commit is contained in:
parent
83a6474d82
commit
847072c2b1
Notes:
sideshowbarker
2024-07-19 11:48:12 +09:00
Author: https://github.com/awesomekling
Commit: 847072c2b1
9 changed files with 68 additions and 13 deletions
|
@ -41,6 +41,9 @@ NonnullRefPtr<StyleValue> parse_css_value(const StringView& view)
|
|||
if (color.has_value())
|
||||
return ColorStyleValue::create(color.value());
|
||||
|
||||
if (string == "-libhtml-link")
|
||||
return IdentifierStyleValue::create(CSS::ValueID::VendorSpecificLink);
|
||||
|
||||
return StringStyleValue::create(string);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue