/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! Generic types for box properties.
usecrate::derives::*; usecrate::values::animated::ToAnimatedZero; usecrate::Zero; use std::fmt::{self, Write}; use style_traits::{CssWriter, ToCss};
#[derive(
Animate,
Clone,
ComputeSquaredDistance,
Copy,
Debug,
FromPrimitive,
MallocSizeOf,
Parse,
PartialEq,
SpecifiedValueInfo,
ToAnimatedValue,
ToComputedValue,
ToCss,
ToResolvedValue,
ToShmem,
ToTyped,
)] #[repr(u8)] #[allow(missing_docs)] pubenum BaselineShiftKeyword { /// Lower by the offset appropriate for subscripts of the parent’s box. The UA may use the /// parent’s font metrics to find this offset; otherwise it defaults to dropping by one /// fifth of the parent’s used font-size.
Sub, /// Raise by the offset appropriate for superscripts of the parent’s box. The UA may use the /// parent’s font metrics to find this offset; otherwise it defaults to raising by one third /// of the parent’s used font-size. Super, /// Align the line-over edge of the aligned subtree with the line-over edge of the line box.
Top, /// Align the center of the aligned subtree with the center of the line box.
Center, /// Align the line-under edge of the aligned subtree with the line-under edge of the line box.
Bottom,
}
/// A generic value for the `baseline-shift` property. /// https://drafts.csswg.org/css-inline-3/#baseline-shift #[derive(
Animate,
Clone,
ComputeSquaredDistance,
Copy,
Debug,
MallocSizeOf,
PartialEq,
SpecifiedValueInfo,
ToAnimatedValue,
ToComputedValue,
ToCss,
ToResolvedValue,
ToShmem,
ToTyped,
)] #[repr(C, u8)] pubenum GenericBaselineShift<LengthPercentage> { /// One of the baseline-shift keywords
Keyword(BaselineShiftKeyword), /// Raise (positive value) or lower (negative value) by the specified length or specified percentage of the line-height.
Length(LengthPercentage),
}
pubuseself::GenericBaselineShift as BaselineShift;
/// Note that we only implement -webkit-line-clamp as a single, longhand /// property for now, but the spec defines line-clamp as a shorthand for /// separate max-lines, block-ellipsis, and continue properties. /// /// https://drafts.csswg.org/css-overflow-3/#line-clamp #[derive(
Clone,
ComputeSquaredDistance,
Copy,
Debug,
MallocSizeOf,
PartialEq,
SpecifiedValueInfo,
ToComputedValue,
ToAnimatedValue,
ToAnimatedZero,
ToResolvedValue,
ToShmem,
ToTyped,
)] #[repr(transparent)] #[value_info(other_values = "none")] pubstruct GenericLineClamp<I>(pub I);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.