mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
style: Serialize background-size: auto auto
as "auto".
With this change, all of Chrome, Edge, Firefox, and Safari serialize background-size by omitting the second "auto" if the value is "auto auto". Other keywords are still repeated. Differential Revision: https://phabricator.services.mozilla.com/D10446
This commit is contained in:
parent
68f4ad9557
commit
56fd3b786f
4 changed files with 53 additions and 3 deletions
|
@ -243,6 +243,13 @@ impl KeyframesName {
|
|||
|
||||
impl Eq for KeyframesName {}
|
||||
|
||||
/// A trait that returns whether a given type is the `auto` value or not. So far
|
||||
/// only needed for background-size serialization, which special-cases `auto`.
|
||||
pub trait IsAuto {
|
||||
/// Returns whether the value is the `auto` value.
|
||||
fn is_auto(&self) -> bool;
|
||||
}
|
||||
|
||||
impl PartialEq for KeyframesName {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.as_atom() == other.as_atom()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue