#[repr(C)]pub enum CssPropertyType {
Show 74 variants
TextColor = 0,
FontSize = 1,
FontFamily = 2,
TextAlign = 3,
LetterSpacing = 4,
LineHeight = 5,
WordSpacing = 6,
TabWidth = 7,
Cursor = 8,
Display = 9,
Float = 10,
BoxSizing = 11,
Width = 12,
Height = 13,
MinWidth = 14,
MinHeight = 15,
MaxWidth = 16,
MaxHeight = 17,
Position = 18,
Top = 19,
Right = 20,
Left = 21,
Bottom = 22,
FlexWrap = 23,
FlexDirection = 24,
FlexGrow = 25,
FlexShrink = 26,
JustifyContent = 27,
AlignItems = 28,
AlignContent = 29,
BackgroundContent = 30,
BackgroundPosition = 31,
BackgroundSize = 32,
BackgroundRepeat = 33,
OverflowX = 34,
OverflowY = 35,
PaddingTop = 36,
PaddingLeft = 37,
PaddingRight = 38,
PaddingBottom = 39,
MarginTop = 40,
MarginLeft = 41,
MarginRight = 42,
MarginBottom = 43,
BorderTopLeftRadius = 44,
BorderTopRightRadius = 45,
BorderBottomLeftRadius = 46,
BorderBottomRightRadius = 47,
BorderTopColor = 48,
BorderRightColor = 49,
BorderLeftColor = 50,
BorderBottomColor = 51,
BorderTopStyle = 52,
BorderRightStyle = 53,
BorderLeftStyle = 54,
BorderBottomStyle = 55,
BorderTopWidth = 56,
BorderRightWidth = 57,
BorderLeftWidth = 58,
BorderBottomWidth = 59,
BoxShadowLeft = 60,
BoxShadowRight = 61,
BoxShadowTop = 62,
BoxShadowBottom = 63,
ScrollbarStyle = 64,
Opacity = 65,
Transform = 66,
TransformOrigin = 67,
PerspectiveOrigin = 68,
BackfaceVisibility = 69,
MixBlendMode = 70,
Filter = 71,
BackdropFilter = 72,
TextShadow = 73,
}Expand description
Represents a CSS key (for example "border-radius" => BorderRadius).
You can also derive this key from a CssProperty by calling CssProperty::get_type().
Variants§
TextColor = 0
FontSize = 1
FontFamily = 2
TextAlign = 3
LetterSpacing = 4
LineHeight = 5
WordSpacing = 6
TabWidth = 7
Cursor = 8
Display = 9
Float = 10
BoxSizing = 11
Width = 12
Height = 13
MinWidth = 14
MinHeight = 15
MaxWidth = 16
MaxHeight = 17
Position = 18
Top = 19
Right = 20
Left = 21
Bottom = 22
FlexWrap = 23
FlexDirection = 24
FlexGrow = 25
FlexShrink = 26
JustifyContent = 27
AlignItems = 28
AlignContent = 29
BackgroundContent = 30
BackgroundPosition = 31
BackgroundSize = 32
BackgroundRepeat = 33
OverflowX = 34
OverflowY = 35
PaddingTop = 36
PaddingLeft = 37
PaddingRight = 38
PaddingBottom = 39
MarginTop = 40
MarginLeft = 41
MarginRight = 42
MarginBottom = 43
BorderTopLeftRadius = 44
BorderTopRightRadius = 45
BorderBottomLeftRadius = 46
BorderBottomRightRadius = 47
BorderTopColor = 48
BorderRightColor = 49
BorderLeftColor = 50
BorderBottomColor = 51
BorderTopStyle = 52
BorderRightStyle = 53
BorderLeftStyle = 54
BorderBottomStyle = 55
BorderTopWidth = 56
BorderRightWidth = 57
BorderLeftWidth = 58
BorderBottomWidth = 59
BoxShadowLeft = 60
BoxShadowRight = 61
BoxShadowTop = 62
BoxShadowBottom = 63
ScrollbarStyle = 64
Opacity = 65
Transform = 66
TransformOrigin = 67
PerspectiveOrigin = 68
BackfaceVisibility = 69
MixBlendMode = 70
Filter = 71
BackdropFilter = 72
TextShadow = 73
Implementations§
Source§impl CssPropertyType
impl CssPropertyType
Sourcepub fn from_str(input: &str, map: &CssKeyMap) -> Option<Self>
pub fn from_str(input: &str, map: &CssKeyMap) -> Option<Self>
Parses a CSS key, such as width from a string:
§Example
let map = get_css_key_map();
assert_eq!(
Some(CssPropertyType::Width),
CssPropertyType::from_str("width", &map)
);
assert_eq!(
Some(CssPropertyType::JustifyContent),
CssPropertyType::from_str("justify-content", &map)
);
assert_eq!(None, CssPropertyType::from_str("asdfasdfasdf", &map));Sourcepub fn to_str(&self) -> &'static str
pub fn to_str(&self) -> &'static str
Returns the original string that was used to construct this CssPropertyType.
Sourcepub fn is_inheritable(&self) -> bool
pub fn is_inheritable(&self) -> bool
Returns whether this property will be inherited during cascading
Sourcepub fn can_trigger_relayout(&self) -> bool
pub fn can_trigger_relayout(&self) -> bool
Returns whether this property can trigger a re-layout (important for incremental layout and caching layouted DOMs).
Sourcepub fn is_gpu_only_property(&self) -> bool
pub fn is_gpu_only_property(&self) -> bool
Returns whether the property is a GPU property (currently only opacity and transforms)
Trait Implementations§
Source§impl Clone for CssPropertyType
impl Clone for CssPropertyType
Source§fn clone(&self) -> CssPropertyType
fn clone(&self) -> CssPropertyType
Returns a duplicate of the value. Read more
1.0.0 · 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 CssPropertyType
impl Debug for CssPropertyType
Source§impl Display for CssPropertyType
impl Display for CssPropertyType
Source§impl Hash for CssPropertyType
impl Hash for CssPropertyType
Source§impl Ord for CssPropertyType
impl Ord for CssPropertyType
Source§fn cmp(&self, other: &CssPropertyType) -> Ordering
fn cmp(&self, other: &CssPropertyType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CssPropertyType
impl PartialEq for CssPropertyType
Source§impl PartialOrd for CssPropertyType
impl PartialOrd for CssPropertyType
impl Copy for CssPropertyType
impl Eq for CssPropertyType
impl StructuralPartialEq for CssPropertyType
Auto Trait Implementations§
impl Freeze for CssPropertyType
impl RefUnwindSafe for CssPropertyType
impl Send for CssPropertyType
impl Sync for CssPropertyType
impl Unpin for CssPropertyType
impl UnwindSafe for CssPropertyType
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