/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! Generic types for CSS values related to borders.
usecrate::values::generics::rect::Rect; usecrate::values::generics::size::Size2D; usecrate::Zero; use std::fmt::{self, Write}; use style_traits::{CssWriter, ToCss};
/// A generic value for a single side of a `border-image-width` property. #[derive(
Animate,
Clone,
ComputeSquaredDistance,
Copy,
Debug,
MallocSizeOf,
Parse,
PartialEq,
SpecifiedValueInfo,
ToAnimatedValue,
ToAnimatedZero,
ToComputedValue,
ToCss,
ToResolvedValue,
ToShmem,
)] #[repr(C, u8)] pubenum GenericBorderImageSideWidth<LP, N> { /// `<number>` /// /// NOTE: Numbers need to be before length-percentagess, in order to parse /// them first, since `0` should be a number, not the `0px` length.
Number(N), /// `<length-or-percentage>`
LengthPercentage(LP), /// `auto`
Auto,
}
pubuseself::GenericBorderImageSideWidth as BorderImageSideWidth;
/// A generic value for the `border-image-slice` property. #[derive(
Animate,
Clone,
ComputeSquaredDistance,
Copy,
Debug,
MallocSizeOf,
PartialEq,
SpecifiedValueInfo,
ToAnimatedValue,
ToAnimatedZero,
ToComputedValue,
ToCss,
ToResolvedValue,
ToShmem,
)] #[repr(C)] pubstruct GenericBorderImageSlice<NumberOrPercentage> { /// The offsets. #[css(field_bound)] pub offsets: Rect<NumberOrPercentage>, /// Whether to fill the middle part. #[animation(constant)] #[css(represents_keyword)] pub fill: bool,
}
pubuseself::GenericBorderImageSlice as BorderImageSlice;
/// A generic value for the `border-*-radius` longhand properties. #[derive(
Animate,
Clone,
ComputeSquaredDistance,
Copy,
Debug,
Deserialize,
MallocSizeOf,
PartialEq,
SpecifiedValueInfo,
Serialize,
ToAnimatedValue,
ToAnimatedZero,
ToComputedValue,
ToCss,
ToResolvedValue,
ToShmem,
)] #[repr(C)] pubstruct GenericBorderCornerRadius<L>( #[css(field_bound)] #[shmem(field_bound)] pub Size2D<L>,
);
pubuseself::GenericBorderCornerRadius as BorderCornerRadius;
/// A generic value for `border-radius` and `inset()`. /// /// <https://drafts.csswg.org/css-backgrounds-3/#border-radius> #[derive(
Animate,
Clone,
ComputeSquaredDistance,
Copy,
Debug,
Deserialize,
MallocSizeOf,
PartialEq,
SpecifiedValueInfo,
Serialize,
ToAnimatedValue,
ToComputedValue,
ToResolvedValue,
ToShmem,
)] #[repr(C)] pubstruct GenericBorderRadius<LengthPercentage> { /// The top left radius. #[shmem(field_bound)] pub top_left: GenericBorderCornerRadius<LengthPercentage>, /// The top right radius. pub top_right: GenericBorderCornerRadius<LengthPercentage>, /// The bottom right radius. pub bottom_right: GenericBorderCornerRadius<LengthPercentage>, /// The bottom left radius. pub bottom_left: GenericBorderCornerRadius<LengthPercentage>,
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.