diff --git a/components/style/values/specified/table.rs b/components/style/values/specified/table.rs index cd2bfa96c5d..79136b12ca1 100644 --- a/components/style/values/specified/table.rs +++ b/components/style/values/specified/table.rs @@ -4,6 +4,8 @@ //! Specified types for CSS values related to tables. +use crate::parser::ParserContext; + /// Specified values for the `caption-side` property. /// /// Note that despite having "physical" names, these are actually interpreted @@ -12,6 +14,11 @@ /// line-start and -end. /// /// 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)] #[derive( Clone, @@ -35,11 +42,15 @@ pub enum CaptionSide { Top, Bottom, #[cfg(feature = "gecko")] + #[parse(condition = "caption_side_non_standard_enabled")] Right, #[cfg(feature = "gecko")] + #[parse(condition = "caption_side_non_standard_enabled")] Left, #[cfg(feature = "gecko")] + #[parse(condition = "caption_side_non_standard_enabled")] TopOutside, #[cfg(feature = "gecko")] + #[parse(condition = "caption_side_non_standard_enabled")] BottomOutside, }