mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
style: Make color-adjust an alias of print-color-adjust as per spec
Differential Revision: https://phabricator.services.mozilla.com/D134779
This commit is contained in:
parent
fcc55f2156
commit
01e43a8488
6 changed files with 20 additions and 10 deletions
|
@ -501,6 +501,7 @@ class Longhand(Property):
|
|||
"OverscrollBehavior",
|
||||
"Percentage",
|
||||
"PositiveIntegerOrNone",
|
||||
"PrintColorAdjust",
|
||||
"Resize",
|
||||
"RubyPosition",
|
||||
"SVGOpacity",
|
||||
|
|
|
@ -56,15 +56,14 @@ ${helpers.single_keyword(
|
|||
spec="https://drafts.csswg.org/css-writing-modes/#propdef-text-orientation",
|
||||
)}
|
||||
|
||||
// CSS Color Module Level 4
|
||||
// https://drafts.csswg.org/css-color/
|
||||
${helpers.single_keyword(
|
||||
"color-adjust",
|
||||
"economy exact",
|
||||
${helpers.predefined_type(
|
||||
"print-color-adjust",
|
||||
"PrintColorAdjust",
|
||||
"computed::PrintColorAdjust::Economy",
|
||||
engines="gecko",
|
||||
gecko_enum_prefix="StyleColorAdjust",
|
||||
aliases="color-adjust",
|
||||
spec="https://drafts.csswg.org/css-color-adjust/#print-color-adjust",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-color/#propdef-color-adjust",
|
||||
)}
|
||||
|
||||
// According to to CSS-IMAGES-3, `optimizespeed` and `optimizequality` are synonyms for `auto`
|
||||
|
|
|
@ -11,7 +11,7 @@ use cssparser::{Color as CSSParserColor, RGBA};
|
|||
use std::fmt;
|
||||
use style_traits::{CssWriter, ToCss};
|
||||
|
||||
pub use crate::values::specified::color::ColorScheme;
|
||||
pub use crate::values::specified::color::{ColorScheme, PrintColorAdjust};
|
||||
|
||||
/// The computed value of the `color` property.
|
||||
pub type ColorPropertyValue = RGBA;
|
||||
|
|
|
@ -50,7 +50,7 @@ pub use self::box_::{Display, Overflow, OverflowAnchor, TransitionProperty};
|
|||
pub use self::box_::{OverflowClipBox, OverscrollBehavior, Perspective, Resize, ScrollbarGutter};
|
||||
pub use self::box_::{ScrollSnapAlign, ScrollSnapAxis, ScrollSnapStrictness, ScrollSnapType};
|
||||
pub use self::box_::{TouchAction, VerticalAlign, WillChange};
|
||||
pub use self::color::{Color, ColorOrAuto, ColorPropertyValue, ColorScheme};
|
||||
pub use self::color::{Color, ColorOrAuto, ColorPropertyValue, ColorScheme, PrintColorAdjust};
|
||||
pub use self::column::ColumnCount;
|
||||
pub use self::counters::{Content, ContentItem, CounterIncrement, CounterReset, CounterSet};
|
||||
pub use self::easing::TimingFunction;
|
||||
|
|
|
@ -1006,3 +1006,13 @@ impl ToCss for ColorScheme {
|
|||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// https://drafts.csswg.org/css-color-adjust/#print-color-adjust
|
||||
#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToComputedValue, ToResolvedValue, ToShmem)]
|
||||
#[repr(u8)]
|
||||
pub enum PrintColorAdjust {
|
||||
/// Ignore backgrounds and darken text.
|
||||
Economy,
|
||||
/// Respect specified colors.
|
||||
Exact,
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ pub use self::box_::{Clear, Float, Overflow, OverflowAnchor};
|
|||
pub use self::box_::{OverflowClipBox, OverscrollBehavior, Perspective, Resize, ScrollbarGutter};
|
||||
pub use self::box_::{ScrollSnapAlign, ScrollSnapAxis, ScrollSnapStrictness, ScrollSnapType};
|
||||
pub use self::box_::{TouchAction, TransitionProperty, VerticalAlign, WillChange};
|
||||
pub use self::color::{Color, ColorOrAuto, ColorPropertyValue, ColorScheme};
|
||||
pub use self::color::{Color, ColorOrAuto, ColorPropertyValue, ColorScheme, PrintColorAdjust};
|
||||
pub use self::column::ColumnCount;
|
||||
pub use self::counters::{Content, ContentItem, CounterIncrement, CounterReset, CounterSet};
|
||||
pub use self::easing::TimingFunction;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue