#[non_exhaustive]pub struct TextShadow {
pub offset_x: LengthDefaultsToZero,
pub offset_y: LengthDefaultsToZero,
pub blur_radius: LengthDefaultsToZero,
pub color: ColorInput,
}Expand description
Represents a text shadow with all its properties.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.offset_x: LengthDefaultsToZeroHorizontal offset of the shadow.
offset_y: LengthDefaultsToZeroVertical offset of the shadow.
blur_radius: LengthDefaultsToZeroBlur radius of the shadow. Higher values create a more blurred shadow.
color: ColorInputColor of the shadow.
Implementations§
Source§impl TextShadow
impl TextShadow
Sourcepub fn builder() -> TextShadowBuilder<((), (), (), ())>
pub fn builder() -> TextShadowBuilder<((), (), (), ())>
Create a builder for building TextShadow.
On the builder, call .offset_x(...)(optional), .offset_y(...)(optional), .blur_radius(...)(optional), .color(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of TextShadow.
Trait Implementations§
Source§impl Clone for TextShadow
impl Clone for TextShadow
Source§fn clone(&self) -> TextShadow
fn clone(&self) -> TextShadow
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextShadow
Source§impl Debug for TextShadow
impl Debug for TextShadow
Source§impl Default for TextShadow
impl Default for TextShadow
Source§fn default() -> TextShadow
fn default() -> TextShadow
Returns the “default value” for a type. Read more
Source§impl<'i> FromCss<'i> for TextShadow
impl<'i> FromCss<'i> for TextShadow
Source§fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, TextShadow>
fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, TextShadow>
Parses a text-shadow value from CSS input.
The text-shadow syntax supports the following components (in that order):
- Two length values for horizontal and vertical offsets (required)
- An optional length value for blur radius
- An optional color value
Examples:
text-shadow: 2px 4px;text-shadow: 2px 4px 6px;text-shadow: 2px 4px red;
Source§const VALID_TOKENS: &'static [CssToken]
const VALID_TOKENS: &'static [CssToken]
Returns the list of valid CSS tokens for this type.
Source§fn from_str(source: &'i str) -> ParseResult<'i, Self>where
Self: Sized,
fn from_str(source: &'i str) -> ParseResult<'i, Self>where
Self: Sized,
Helper function to parse the type from a string.
Source§const EXPECT_MESSAGE: CssExpectedMessage = CssExpectedMessage::OneValue
const EXPECT_MESSAGE: CssExpectedMessage = CssExpectedMessage::OneValue
Message template used when building parse errors for this type.
Source§impl PartialEq for TextShadow
impl PartialEq for TextShadow
Source§fn eq(&self, other: &TextShadow) -> bool
fn eq(&self, other: &TextShadow) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TextShadow
Source§impl TailwindPropertyParser for TextShadow
impl TailwindPropertyParser for TextShadow
Auto Trait Implementations§
impl Freeze for TextShadow
impl RefUnwindSafe for TextShadow
impl Send for TextShadow
impl Sync for TextShadow
impl Unpin for TextShadow
impl UnsafeUnpin for TextShadow
impl UnwindSafe for TextShadow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more