mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Support vendor prefix keyframes rule.
If there are multiple prefixed/non-prefixed @keyframes with the same name; * non-prefixed rule overrides earlier rules. * prefixed rule overrides earlier prefixed rules.
This commit is contained in:
parent
17dc598d99
commit
973d8287a9
7 changed files with 73 additions and 23 deletions
|
@ -7,6 +7,7 @@
|
|||
#![deny(missing_docs)]
|
||||
|
||||
use num_traits::ToPrimitive;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::convert::AsRef;
|
||||
use std::iter::{Filter, Peekable};
|
||||
use std::str::Split;
|
||||
|
@ -144,3 +145,9 @@ pub fn str_join<I, T>(strs: I, join: &str) -> String
|
|||
acc
|
||||
})
|
||||
}
|
||||
|
||||
/// Returns true if a given string has a given prefix with case-insensitive match.
|
||||
pub fn starts_with_ignore_ascii_case(string: &str, prefix: &str) -> bool {
|
||||
string.len() > prefix.len() &&
|
||||
string[0..prefix.len()].eq_ignore_ascii_case(prefix)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue