style: Hide non-standard values of caption-side.

Differential Revision: https://phabricator.services.mozilla.com/D104321
This commit is contained in:
Pierre TALLOTTE 2021-02-12 15:45:48 +00:00 committed by Emilio Cobos Álvarez
parent 4cb0a781d1
commit 48db30f6e2

View file

@ -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,
} }