From 5b8f65190a7c54586f3b2025cc5619b3542a4f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 15 Dec 2017 21:43:29 +0100 Subject: [PATCH] style: Handle servo-prefixed stuff correctly. --- components/style_derive/cg.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/style_derive/cg.rs b/components/style_derive/cg.rs index 52adb15a582..aa18fc45d10 100644 --- a/components/style_derive/cg.rs +++ b/components/style_derive/cg.rs @@ -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, _ => {}, } }