/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! Computed types for CSS values related to borders. use values::animated::ToAnimatedZero; use values::computed::{Number, NumberOrPercentage}; use values::computed::length::LengthOrPercentage; use values::generics::border::BorderCornerRadius as GenericBorderCornerRadius; use values::generics::border::BorderImageSideWidth as GenericBorderImageSideWidth; use values::generics::border::BorderImageSlice as GenericBorderImageSlice; use values::generics::border::BorderRadius as GenericBorderRadius; use values::generics::rect::Rect; /// A computed value for the `border-image-width` property. pub type BorderImageWidth = Rect; /// A computed value for a single side of a `border-image-width` property. pub type BorderImageSideWidth = GenericBorderImageSideWidth; /// A computed value for the `border-image-slice` property. pub type BorderImageSlice = GenericBorderImageSlice; /// A computed value for the `border-radius` property. pub type BorderRadius = GenericBorderRadius; /// A computed value for the `border-*-radius` longhand properties. pub type BorderCornerRadius = GenericBorderCornerRadius; impl BorderImageSideWidth { /// Returns `1`. #[inline] pub fn one() -> Self { GenericBorderImageSideWidth::Number(1.) } } impl ToAnimatedZero for BorderCornerRadius { #[inline] fn to_animated_zero(&self) -> Result { // FIXME(nox): Why? Err(()) } }