mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
style: Implement parsing of container relative lengths
- For now, implementation always returns the fallback value, i.e. small viewport lengths. - Enabled via existing pref `layout.css.container-queries.enabled`. Differential Revision: https://phabricator.services.mozilla.com/D158054
This commit is contained in:
parent
4dd841a036
commit
d8785f3a22
4 changed files with 202 additions and 3 deletions
|
@ -58,6 +58,13 @@ impl specified::NoCalcLength {
|
|||
.add_flags(ComputedValueFlags::USES_VIEWPORT_UNITS);
|
||||
length.to_computed_value(context)
|
||||
},
|
||||
specified::NoCalcLength::ContainerRelative(length) => {
|
||||
// Fallback uses small viewport size.
|
||||
context
|
||||
.builder
|
||||
.add_flags(ComputedValueFlags::USES_VIEWPORT_UNITS);
|
||||
length.to_computed_value(context)
|
||||
},
|
||||
specified::NoCalcLength::ServoCharacterWidth(length) => {
|
||||
length.to_computed_value(context.style().get_font().clone_font_size().size())
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue