mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -6,7 +6,7 @@
|
|||
|
||||
use app_units::Au;
|
||||
use values::{Either, RGBA};
|
||||
use values::computed::LengthOrPercentageOrNumber;
|
||||
use values::computed::{LengthOrPercentageOrNumber, Opacity};
|
||||
use values::generics::svg as generic;
|
||||
|
||||
/// Computed SVG Paint value
|
||||
|
@ -51,3 +51,12 @@ impl Default for SVGStrokeDashArray {
|
|||
generic::SVGStrokeDashArray::Values(vec![])
|
||||
}
|
||||
}
|
||||
|
||||
/// <opacity-value> | context-fill-opacity | context-stroke-opacity
|
||||
pub type SVGOpacity = generic::SVGOpacity<Opacity>;
|
||||
|
||||
impl Default for SVGOpacity {
|
||||
fn default() -> Self {
|
||||
generic::SVGOpacity::Opacity(1.)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue