mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
style: Hide non-standard values of caption-side.
Differential Revision: https://phabricator.services.mozilla.com/D104321
This commit is contained in:
parent
4cb0a781d1
commit
48db30f6e2
1 changed files with 11 additions and 0 deletions
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
//! Specified types for CSS values related to tables.
|
//! Specified types for CSS values related to tables.
|
||||||
|
|
||||||
|
use crate::parser::ParserContext;
|
||||||
|
|
||||||
/// Specified values for the `caption-side` property.
|
/// Specified values for the `caption-side` property.
|
||||||
///
|
///
|
||||||
/// Note that despite having "physical" names, these are actually interpreted
|
/// Note that despite having "physical" names, these are actually interpreted
|
||||||
|
@ -12,6 +14,11 @@
|
||||||
/// line-start and -end.
|
/// line-start and -end.
|
||||||
///
|
///
|
||||||
/// https://drafts.csswg.org/css-tables/#propdef-caption-side
|
/// https://drafts.csswg.org/css-tables/#propdef-caption-side
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
|
fn caption_side_non_standard_enabled(_context: &ParserContext) -> bool {
|
||||||
|
static_prefs::pref!("layout.css.caption-side-non-standard.enabled")
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone,
|
Clone,
|
||||||
|
@ -35,11 +42,15 @@ pub enum CaptionSide {
|
||||||
Top,
|
Top,
|
||||||
Bottom,
|
Bottom,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
|
#[parse(condition = "caption_side_non_standard_enabled")]
|
||||||
Right,
|
Right,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
|
#[parse(condition = "caption_side_non_standard_enabled")]
|
||||||
Left,
|
Left,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
|
#[parse(condition = "caption_side_non_standard_enabled")]
|
||||||
TopOutside,
|
TopOutside,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
|
#[parse(condition = "caption_side_non_standard_enabled")]
|
||||||
BottomOutside,
|
BottomOutside,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue