mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Handle servo-prefixed stuff correctly.
This commit is contained in:
parent
8fbdbc8f95
commit
5b8f65190a
1 changed files with 2 additions and 2 deletions
|
@ -409,7 +409,7 @@ pub fn where_predicate(
|
|||
|
||||
/// Transforms "FooBar" to "foo-bar".
|
||||
///
|
||||
/// If the first Camel segment is "Moz" or "Webkit", the result string
|
||||
/// If the first Camel segment is "Moz", "Webkit", or "Servo", the result string
|
||||
/// is prepended with "-".
|
||||
pub fn to_css_identifier(mut camel_case: &str) -> String {
|
||||
camel_case = camel_case.trim_right_matches('_');
|
||||
|
@ -418,7 +418,7 @@ pub fn to_css_identifier(mut camel_case: &str) -> String {
|
|||
while let Some(segment) = split_camel_segment(&mut camel_case) {
|
||||
if first {
|
||||
match segment {
|
||||
"Moz" | "Webkit" => first = false,
|
||||
"Moz" | "Webkit" | "Servo" => first = false,
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue