#[repr(u8)]pub enum DominantBaseline {
Auto = 0,
TextBottom = 1,
Alphabetic = 2,
Ideographic = 3,
Middle = 4,
Central = 5,
Mathematical = 6,
Hanging = 7,
TextTop = 8,
}Expand description
A specified value for the dominant-baseline property.
https://drafts.csswg.org/css-inline-3/#dominant-baseline
Variants§
Auto = 0
Equivalent to ‘alphabetic’ in horizontal writing modes and in vertical writing modes when ‘text-orientation’ is sideways. Equivalent to ‘central’ in vertical writing modes when ‘text-orientation’ is ‘mixed’ or ‘upright’.
TextBottom = 1
Use the text-under baseline.
Alphabetic = 2
Use the alphabetic baseline.
Ideographic = 3
Use the ideographic-under baseline.
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.
Mathematical = 6
Use the math baseline.
Hanging = 7
Use the hanging baseline.
TextTop = 8
Use the text-over baseline.
Implementations§
Source§impl DominantBaseline
impl DominantBaseline
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 DominantBaseline
impl Clone for DominantBaseline
Source§fn clone(&self) -> DominantBaseline
fn clone(&self) -> DominantBaseline
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DominantBaseline
impl Debug for DominantBaseline
Source§impl FromPrimitive for DominantBaseline
impl FromPrimitive for DominantBaseline
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 DominantBaseline
impl Hash for DominantBaseline
Source§impl MallocSizeOf for DominantBaseline
impl MallocSizeOf for DominantBaseline
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Source§impl Parse for DominantBaseline
impl Parse for DominantBaseline
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 DominantBaseline
impl PartialEq for DominantBaseline
Source§impl SpecifiedValueInfo for DominantBaseline
impl SpecifiedValueInfo for DominantBaseline
Source§const SUPPORTED_TYPES: u8 = 0u8
const SUPPORTED_TYPES: u8 = 0u8
Source§impl ToComputedValue for DominantBaseline
impl ToComputedValue for DominantBaseline
Source§type ComputedValue = DominantBaseline
type ComputedValue = DominantBaseline
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 DominantBaseline
impl ToCss for DominantBaseline
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 DominantBaseline
impl ToResolvedValue for DominantBaseline
Source§type ResolvedValue = DominantBaseline
type ResolvedValue = DominantBaseline
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 DominantBaseline
impl ToShmem for DominantBaseline
Source§impl ToTyped for DominantBaseline
impl ToTyped for DominantBaseline
Source§fn to_typed(&self) -> Option<TypedValue>
fn to_typed(&self) -> Option<TypedValue>
impl Copy for DominantBaseline
impl Eq for DominantBaseline
impl StructuralPartialEq for DominantBaseline
Auto Trait Implementations§
impl Freeze for DominantBaseline
impl RefUnwindSafe for DominantBaseline
impl Send for DominantBaseline
impl Sync for DominantBaseline
impl Unpin for DominantBaseline
impl UnwindSafe for DominantBaseline
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