#[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,
axis: LogicalAxis,
cb_wm: &WritingMode,
) -> Option<AlignFlags>
pub fn to_self_alignment( self, axis: LogicalAxis, cb_wm: &WritingMode, ) -> Option<AlignFlags>
Returns a value for the self-alignment properties in order to resolve
normal, in terms of the containing block’s writing mode.
Note that the caller must have converted the position-area to physical values.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§impl FromPrimitive for PositionAreaKeyword
impl FromPrimitive for PositionAreaKeyword
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>>
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
Source§impl ToComputedValue for PositionAreaKeyword
impl ToComputedValue for PositionAreaKeyword
Source§type ComputedValue = PositionAreaKeyword
type ComputedValue = PositionAreaKeyword
Source§fn from_computed_value(from: &Self::ComputedValue) -> Self
fn from_computed_value(from: &Self::ComputedValue) -> Self
Source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
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,
self in CSS syntax, writing to dest.Source§fn to_css_string(&self) -> String
fn to_css_string(&self) -> String
self in CSS syntax and return a string. Read moreSource§fn to_css_cssstring(&self) -> String
fn to_css_cssstring(&self) -> String
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
Source§fn from_resolved_value(from: Self::ResolvedValue) -> Self
fn from_resolved_value(from: Self::ResolvedValue) -> Self
Source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
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
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§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
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>
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>
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 more