pub struct ShadowSpec {
pub offset_x: f32,
pub offset_y: f32,
pub blur: f32,
pub spread: f32,
pub color: Rgba,
pub inner: bool,
}Expand description
Parsed shadow= / box-shadow= value. Authors may stack multiple
shadows via comma separation in CSS; markup accepts a single entry.
inner flips drop -> inset.
Fields§
§offset_x: f32Horizontal offset in px.
offset_y: f32Vertical offset in px.
blur: f32Gaussian blur radius (std-dev) in px.
spread: f32CSS box-shadow spread radius in px - grows (positive) or
shrinks (negative) the shadow rect before blurring. Enables the
hard double-ring focus idiom (box-shadow: 0 0 0 2px <color>).
color: RgbaShadow color (alpha controls softness).
inner: booltrue = inset (inner) shadow. Default false.
Trait Implementations§
Source§impl Clone for ShadowSpec
impl Clone for ShadowSpec
Source§fn clone(&self) -> ShadowSpec
fn clone(&self) -> ShadowSpec
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 moreSource§impl Debug for ShadowSpec
impl Debug for ShadowSpec
Source§impl<'de> Deserialize<'de> for ShadowSpec
impl<'de> Deserialize<'de> for ShadowSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ShadowSpec> for ShadowSpec
impl From<ShadowSpec> for ShadowSpec
Source§fn from(s: ShadowSpec) -> Self
fn from(s: ShadowSpec) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ShadowSpec
impl PartialEq for ShadowSpec
Source§fn eq(&self, other: &ShadowSpec) -> bool
fn eq(&self, other: &ShadowSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ShadowSpec
impl Serialize for ShadowSpec
impl Copy for ShadowSpec
impl StructuralPartialEq for ShadowSpec
Auto Trait Implementations§
impl Freeze for ShadowSpec
impl RefUnwindSafe for ShadowSpec
impl Send for ShadowSpec
impl Sync for ShadowSpec
impl Unpin for ShadowSpec
impl UnsafeUnpin for ShadowSpec
impl UnwindSafe for ShadowSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.