Add svg mods and move SVG-related types into them.

This commit is contained in:
Xidorn Quan 2017-08-02 09:27:43 +10:00
parent 4d71eed898
commit 0071c7663f
8 changed files with 154 additions and 125 deletions

View file

@ -43,6 +43,7 @@ pub use self::length::{LengthOrPercentageOrNone, MaxLength, MozLength};
pub use self::length::{NoCalcLength, Percentage, ViewportPercentageLength};
pub use self::rect::LengthOrNumberRect;
pub use self::position::{Position, PositionComponent};
pub use self::svg::{SVGPaint, SVGPaintKind};
pub use self::text::{InitialLetter, LetterSpacing, LineHeight, WordSpacing};
pub use self::transform::{TimingFunction, TransformOrigin};
pub use super::generics::grid::GridLine;
@ -64,6 +65,7 @@ pub mod image;
pub mod length;
pub mod position;
pub mod rect;
pub mod svg;
pub mod text;
pub mod transform;
@ -703,14 +705,6 @@ pub type TrackList = GenericTrackList<LengthOrPercentage>;
/// `<grid-template-rows> | <grid-template-columns>`
pub type GridTemplateComponent = GenericGridTemplateComponent<LengthOrPercentage>;
no_viewport_percentage!(SVGPaint);
/// Specified SVG Paint value
pub type SVGPaint = ::values::generics::SVGPaint<RGBAColor>;
/// Specified SVG Paint Kind value
pub type SVGPaintKind = ::values::generics::SVGPaintKind<RGBAColor>;
/// <length> | <percentage> | <number>
pub type LengthOrPercentageOrNumber = Either<Number, LengthOrPercentage>;