mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 10:09:14 +00:00
LibWeb/CSS: Add math expression support for transform-origin
This commit is contained in:
parent
3406b69614
commit
85356094b5
Notes:
github-actions[bot]
2024-10-27 09:35:38 +00:00
Author: https://github.com/ankushChatterjee 🔰
Commit: 85356094b5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1934
3 changed files with 7 additions and 2 deletions
|
@ -138,8 +138,8 @@ text-indent: 'calc(2%)' -> 'calc(2%)'
|
||||||
text-indent: 'calc(2% * var(--n))' -> '4%'
|
text-indent: 'calc(2% * var(--n))' -> '4%'
|
||||||
top: 'calc(2%)' -> 'calc(2%)'
|
top: 'calc(2%)' -> 'calc(2%)'
|
||||||
top: 'calc(2% * var(--n))' -> '4%'
|
top: 'calc(2% * var(--n))' -> '4%'
|
||||||
transform-origin: 'calc(2px) calc(2%)' -> '50% 50%'
|
transform-origin: 'calc(2px) calc(2%)' -> 'calc(2px) calc(2%)'
|
||||||
transform-origin: 'calc(2px * var(--n)) calc(2% * var(--n))' -> '50% 50%'
|
transform-origin: 'calc(2px * var(--n)) calc(2% * var(--n))' -> 'calc(2px * 2) 4%'
|
||||||
transition-delay: 'calc(2s)' -> 'calc(2s)'
|
transition-delay: 'calc(2s)' -> 'calc(2s)'
|
||||||
transition-delay: 'calc(2s * var(--n))' -> '4s'
|
transition-delay: 'calc(2s * var(--n))' -> '4s'
|
||||||
transition-duration: 'calc(2s)' -> 'calc(2s)'
|
transition-duration: 'calc(2s)' -> 'calc(2s)'
|
||||||
|
|
|
@ -6929,6 +6929,9 @@ RefPtr<CSSStyleValue> Parser::parse_transform_origin_value(TokenStream<Component
|
||||||
return OptionalNone {};
|
return OptionalNone {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (value->is_math()) {
|
||||||
|
return AxisOffset { Axis::None, value->as_math() };
|
||||||
|
}
|
||||||
return OptionalNone {};
|
return OptionalNone {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -534,6 +534,8 @@ static Optional<LengthPercentage> length_percentage_for_style_value(CSSStyleValu
|
||||||
return value.as_length().length();
|
return value.as_length().length();
|
||||||
if (value.is_percentage())
|
if (value.is_percentage())
|
||||||
return value.as_percentage().percentage();
|
return value.as_percentage().percentage();
|
||||||
|
if (value.is_math())
|
||||||
|
return LengthPercentage { const_cast<CSSMathValue&>(value.as_math()) };
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue