#[repr(u8)]pub enum AlignmentBaseline {
Baseline = 0,
TextBottom = 1,
Alphabetic = 2,
Ideographic = 3,
Middle = 4,
Central = 5,
Mathematical = 6,
Hanging = 7,
TextTop = 8,
}Expand description
A specified value for the alignment-baseline property.
https://drafts.csswg.org/css-inline-3/#alignment-baseline
Variants§
Baseline = 0
Use the dominant baseline choice of the parent.
TextBottom = 1
Use the text-under baseline.
Alphabetic = 2
Use the alphabetic baseline. TODO: Bug 2010717 - Remove css(skip) to support alignment-baseline: alphabetic
Ideographic = 3
Use the ideographic-under baseline. TODO: Bug 2010718 - Remove css(skip) support alignment-baseline: ideographic
Middle = 4
In general, use the x-middle baselines; except under text-orientation: upright (where the alphabetic and x-height baselines are essentially meaningless) use the central baseline instead.
Central = 5
Use the central baseline. TODO: Bug 2010719 - Remove css(skip) to support alignment-baseline: central
Mathematical = 6
Use the math baseline. TODO: Bug 2010720 - Remove css(skip) to support alignment-baseline: mathematical
Hanging = 7
Use the hanging baseline. TODO: Bug 2017197 - Remove css(skip) to support alignment-baseline: hanging
TextTop = 8
Use the text-over baseline.
Implementations§
Source§impl AlignmentBaseline
impl AlignmentBaseline
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.
Trait Implementations§
Source§impl Clone for AlignmentBaseline
impl Clone for AlignmentBaseline
Source§fn clone(&self) -> AlignmentBaseline
fn clone(&self) -> AlignmentBaseline
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AlignmentBaseline
impl Debug for AlignmentBaseline
Source§impl FromPrimitive for AlignmentBaseline
impl FromPrimitive for AlignmentBaseline
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 Hash for AlignmentBaseline
impl Hash for AlignmentBaseline
Source§impl MallocSizeOf for AlignmentBaseline
impl MallocSizeOf for AlignmentBaseline
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Source§impl Parse for AlignmentBaseline
impl Parse for AlignmentBaseline
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 AlignmentBaseline
impl PartialEq for AlignmentBaseline
Source§impl SpecifiedValueInfo for AlignmentBaseline
impl SpecifiedValueInfo for AlignmentBaseline
Source§const SUPPORTED_TYPES: u8 = 0u8
const SUPPORTED_TYPES: u8 = 0u8
Source§impl ToComputedValue for AlignmentBaseline
impl ToComputedValue for AlignmentBaseline
Source§type ComputedValue = AlignmentBaseline
type ComputedValue = AlignmentBaseline
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 AlignmentBaseline
impl ToCss for AlignmentBaseline
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 AlignmentBaseline
impl ToResolvedValue for AlignmentBaseline
Source§type ResolvedValue = AlignmentBaseline
type ResolvedValue = AlignmentBaseline
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 AlignmentBaseline
impl ToShmem for AlignmentBaseline
Source§impl ToTyped for AlignmentBaseline
impl ToTyped for AlignmentBaseline
Source§fn to_typed(&self) -> Option<TypedValue>
fn to_typed(&self) -> Option<TypedValue>
impl Copy for AlignmentBaseline
impl Eq for AlignmentBaseline
impl StructuralPartialEq for AlignmentBaseline
Auto Trait Implementations§
impl Freeze for AlignmentBaseline
impl RefUnwindSafe for AlignmentBaseline
impl Send for AlignmentBaseline
impl Sync for AlignmentBaseline
impl Unpin for AlignmentBaseline
impl UnwindSafe for AlignmentBaseline
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