style: Add an 'auto' value for the CSS 'quotes' property, and make it use language-dependent quote marks.

Differential Revision: https://phabricator.services.mozilla.com/D36429
This commit is contained in:
Jonathan Kew 2019-07-09 08:59:27 +00:00 committed by Emilio Cobos Álvarez
parent c00045b0c9
commit 6cf87d23f8
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
4 changed files with 39 additions and 25 deletions

View file

@ -7,28 +7,12 @@
#[cfg(feature = "gecko")]
pub use crate::values::specified::list::ListStyleType;
pub use crate::values::specified::list::MozListReversed;
pub use crate::values::specified::list::{QuotePair, Quotes};
lazy_static! {
static ref INITIAL_QUOTES: crate::ArcSlice<QuotePair> = crate::ArcSlice::from_iter_leaked(
vec![
QuotePair {
opening: "\u{201c}".to_owned().into(),
closing: "\u{201d}".to_owned().into(),
},
QuotePair {
opening: "\u{2018}".to_owned().into(),
closing: "\u{2019}".to_owned().into(),
},
]
.into_iter()
);
}
pub use crate::values::specified::list::Quotes;
impl Quotes {
/// Initial value for `quotes`.
#[inline]
pub fn get_initial_value() -> Quotes {
Quotes(INITIAL_QUOTES.clone())
Quotes::Auto
}
}

View file

@ -64,7 +64,7 @@ pub use self::length::{NonNegativeLengthPercentage, NonNegativeLengthPercentageO
#[cfg(feature = "gecko")]
pub use self::list::ListStyleType;
pub use self::list::MozListReversed;
pub use self::list::{QuotePair, Quotes};
pub use self::list::Quotes;
pub use self::motion::{OffsetPath, OffsetRotate};
pub use self::outline::OutlineStyle;
pub use self::percentage::{NonNegativePercentage, Percentage};