mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Move caption-side outside of mako.
Make it an enum class, etc. Differential Revision: https://phabricator.services.mozilla.com/D103978
This commit is contained in:
parent
e084d8e9d2
commit
5fe702fa2b
6 changed files with 60 additions and 5 deletions
45
components/style/values/specified/table.rs
Normal file
45
components/style/values/specified/table.rs
Normal file
|
@ -0,0 +1,45 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! Specified types for CSS values related to tables.
|
||||
|
||||
/// Specified values for the `caption-side` property.
|
||||
///
|
||||
/// Note that despite having "physical" names, these are actually interpreted
|
||||
/// according to the table's writing-mode: Top and Bottom are treated as
|
||||
/// block-start and -end respectively, and Left and Right are treated as
|
||||
/// line-start and -end.
|
||||
///
|
||||
/// https://drafts.csswg.org/css-tables/#propdef-caption-side
|
||||
#[allow(missing_docs)]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Eq,
|
||||
FromPrimitive,
|
||||
MallocSizeOf,
|
||||
Ord,
|
||||
Parse,
|
||||
PartialEq,
|
||||
PartialOrd,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
#[repr(u8)]
|
||||
pub enum CaptionSide {
|
||||
Top,
|
||||
Bottom,
|
||||
#[cfg(feature = "gecko")]
|
||||
Right,
|
||||
#[cfg(feature = "gecko")]
|
||||
Left,
|
||||
#[cfg(feature = "gecko")]
|
||||
TopOutside,
|
||||
#[cfg(feature = "gecko")]
|
||||
BottomOutside,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue