mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
LibWeb: Fix logic issue when parsing CSS custom properties
With best wishes from De Morgan, this is the correct way to check whether the string isn't of the form "var(...)".
This commit is contained in:
parent
b54bfdd696
commit
6d3361f077
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ static bool takes_integer_value(CSS::PropertyID property_id)
|
|||
|
||||
static StringView parse_custom_property_name(const StringView& value)
|
||||
{
|
||||
if (!value.starts_with("var(") && !value.ends_with(")"))
|
||||
if (!value.starts_with("var(") || !value.ends_with(")"))
|
||||
return {};
|
||||
// FIXME: Allow for fallback
|
||||
auto first_comma_index = value.find_first_of(",");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue