#[repr(u8)]pub enum PositionAreaKeyword {
Show 51 variants
None = 40,
Center = 42,
SpanAll = 47,
Start = 33,
End = 36,
SpanStart = 35,
SpanEnd = 38,
Left = 1,
Right = 4,
Top = 9,
Bottom = 12,
XStart = 17,
XEnd = 20,
YStart = 25,
YEnd = 28,
BlockStart = 49,
BlockEnd = 52,
InlineStart = 57,
InlineEnd = 60,
SpanLeft = 3,
SpanRight = 6,
SpanTop = 11,
SpanBottom = 14,
SpanXStart = 19,
SpanXEnd = 22,
SpanYStart = 27,
SpanYEnd = 30,
SpanBlockStart = 51,
SpanBlockEnd = 54,
SpanInlineStart = 59,
SpanInlineEnd = 62,
SelfStart = 97,
SelfEnd = 100,
SpanSelfStart = 99,
SpanSelfEnd = 102,
SelfXStart = 81,
SelfXEnd = 84,
SelfYStart = 89,
SelfYEnd = 92,
SelfBlockStart = 113,
SelfBlockEnd = 116,
SelfInlineStart = 121,
SelfInlineEnd = 124,
SpanSelfXStart = 83,
SpanSelfXEnd = 86,
SpanSelfYStart = 91,
SpanSelfYEnd = 94,
SpanSelfBlockStart = 115,
SpanSelfBlockEnd = 118,
SpanSelfInlineStart = 123,
SpanSelfInlineEnd = 126,
}Expand description
Possible values for the position-area property’s keywords.
Represented by [0z xxx yyy], where z means “self wm resolution”, xxxx is the axis (as in
PositionAreaAxis) and yyy is the PositionAreaTrack
https://drafts.csswg.org/css-anchor-position-1/#propdef-position-area
Variants§
None = 40
Center = 42
SpanAll = 47
Start = 33
End = 36
SpanStart = 35
SpanEnd = 38
Left = 1
Right = 4
Top = 9
Bottom = 12
XStart = 17
XEnd = 20
YStart = 25
YEnd = 28
BlockStart = 49
BlockEnd = 52
InlineStart = 57
InlineEnd = 60
SpanLeft = 3
SpanRight = 6
SpanTop = 11
SpanBottom = 14
SpanXStart = 19
SpanXEnd = 22
SpanYStart = 27
SpanYEnd = 30
SpanBlockStart = 51
SpanBlockEnd = 54
SpanInlineStart = 59
SpanInlineEnd = 62
SelfStart = 97
SelfEnd = 100
SpanSelfStart = 99
SpanSelfEnd = 102
SelfXStart = 81
SelfXEnd = 84
SelfYStart = 89
SelfYEnd = 92
SelfBlockStart = 113
SelfBlockEnd = 116
SelfInlineStart = 121
SelfInlineEnd = 124
SpanSelfXStart = 83
SpanSelfXEnd = 86
SpanSelfYStart = 91
SpanSelfYEnd = 94
SpanSelfBlockStart = 115
SpanSelfBlockEnd = 118
SpanSelfInlineStart = 123
SpanSelfInlineEnd = 126
Implementations§
Source§impl PositionAreaKeyword
impl PositionAreaKeyword
Sourcepub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>>
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>>
Parse this keyword.
Sourcepub fn from_ident(ident: &str) -> Result<Self, ()>
pub fn from_ident(ident: &str) -> Result<Self, ()>
Parse this keyword from a string slice.
Source§impl PositionAreaKeyword
impl PositionAreaKeyword
Sourcepub fn axis(self) -> PositionAreaAxis
pub fn axis(self) -> PositionAreaAxis
Get this keyword’s axis.
Sourcepub fn with_axis(self, axis: PositionAreaAxis) -> Self
pub fn with_axis(self, axis: PositionAreaAxis) -> Self
Returns this keyword but with the axis swapped by the argument.
Sourcepub fn with_inferred_axis(self, axis: PositionAreaAxis) -> Self
pub fn with_inferred_axis(self, axis: PositionAreaAxis) -> Self
If this keyword uses an inferred axis, replaces it.
Sourcepub fn track(self) -> Option<PositionAreaTrack>
pub fn track(self) -> Option<PositionAreaTrack>
Get this keyword’s track, or None if we’re the None keyword.
fn group_type(self) -> PositionAreaType
fn to_physical( self, cb_wm: WritingMode, self_wm: WritingMode, inferred_axis: LogicalAxis, ) -> Self
fn flip_track(self) -> Self
Sourcepub fn to_self_alignment(self) -> Option<AlignFlags>
pub fn to_self_alignment(self) -> Option<AlignFlags>
Returns a value for the self-alignment properties in order to resolve
normal.
https://drafts.csswg.org/css-anchor-position/#position-area-alignment
Trait Implementations§
Source§impl Clone for PositionAreaKeyword
impl Clone for PositionAreaKeyword
Source§fn clone(&self) -> PositionAreaKeyword
fn clone(&self) -> PositionAreaKeyword
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 PositionAreaKeyword
impl Debug for PositionAreaKeyword
Source§impl Default for PositionAreaKeyword
impl Default for PositionAreaKeyword
Source§fn default() -> PositionAreaKeyword
fn default() -> PositionAreaKeyword
Returns the “default value” for a type. Read more
Source§impl FromPrimitive for PositionAreaKeyword
impl FromPrimitive for PositionAreaKeyword
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
Converts an
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
Converts an
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
Converts an
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
Converts an
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
Converts an
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
Converts an
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
Converts an
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
Converts a
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
Converts an
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
Converts an
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
Converts an
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
Converts an
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§impl MallocSizeOf for PositionAreaKeyword
impl MallocSizeOf for PositionAreaKeyword
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl Parse for PositionAreaKeyword
impl Parse for PositionAreaKeyword
Source§fn parse<'i, 't>(
_: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
fn parse<'i, 't>( _: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more
Source§impl PartialEq for PositionAreaKeyword
impl PartialEq for PositionAreaKeyword
Source§impl SpecifiedValueInfo for PositionAreaKeyword
impl SpecifiedValueInfo for PositionAreaKeyword
Source§const SUPPORTED_TYPES: u8 = 0u8
const SUPPORTED_TYPES: u8 = 0u8
Supported CssTypes by the given value type. Read more
Source§impl ToComputedValue for PositionAreaKeyword
impl ToComputedValue for PositionAreaKeyword
Source§type ComputedValue = PositionAreaKeyword
type ComputedValue = PositionAreaKeyword
The computed value type we’re going to be converted to.
Source§fn from_computed_value(from: &Self::ComputedValue) -> Self
fn from_computed_value(from: &Self::ComputedValue) -> Self
Convert a computed value to specified value form. Read more
Source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context.Source§impl ToCss for PositionAreaKeyword
impl ToCss for PositionAreaKeyword
Source§fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
W: Write,
Serialize
self in CSS syntax, writing to dest.Source§fn to_css_string(&self) -> String
fn to_css_string(&self) -> String
Serialize
self in CSS syntax and return a string. Read moreSource§fn to_css_cssstring(&self) -> String
fn to_css_cssstring(&self) -> String
Serialize
self in CSS syntax and return a CssString. Read moreSource§impl ToResolvedValue for PositionAreaKeyword
impl ToResolvedValue for PositionAreaKeyword
Source§type ResolvedValue = PositionAreaKeyword
type ResolvedValue = PositionAreaKeyword
The resolved value type we’re going to be converted to.
Source§fn from_resolved_value(from: Self::ResolvedValue) -> Self
fn from_resolved_value(from: Self::ResolvedValue) -> Self
Convert a resolved value to resolved value form.
Source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
Convert a resolved value to a resolved value.
Source§impl ToShmem for PositionAreaKeyword
impl ToShmem for PositionAreaKeyword
impl Copy for PositionAreaKeyword
impl Eq for PositionAreaKeyword
impl StructuralPartialEq for PositionAreaKeyword
Auto Trait Implementations§
impl Freeze for PositionAreaKeyword
impl RefUnwindSafe for PositionAreaKeyword
impl Send for PositionAreaKeyword
impl Sync for PositionAreaKeyword
impl Unpin for PositionAreaKeyword
impl UnwindSafe for PositionAreaKeyword
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert