mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add context-{fill,stroke}-opacity support to {fill,stroke}-opacity.
This commit is contained in:
parent
7827ca6bb5
commit
ef4352d2a5
8 changed files with 149 additions and 7 deletions
|
@ -138,3 +138,16 @@ impl<LengthType> ToCss for SVGStrokeDashArray<LengthType> where LengthType: ToCs
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// An SVG opacity value accepts `context-{fill,stroke}-opacity` in
|
||||
/// addition to opacity value.
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, HasViewportPercentage, ToComputedValue, ToCss)]
|
||||
pub enum SVGOpacity<OpacityType> {
|
||||
/// `<opacity-value>`
|
||||
Opacity(OpacityType),
|
||||
/// `context-fill-opacity`
|
||||
ContextFillOpacity,
|
||||
/// `context-stroke-opacity`
|
||||
ContextStrokeOpacity,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue