aboutsummaryrefslogtreecommitdiffstats
path: root/components/style_derive/to_css.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/style_derive/to_css.rs')
-rw-r--r--components/style_derive/to_css.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/components/style_derive/to_css.rs b/components/style_derive/to_css.rs
index 5f2fa3aa8d1..6f705ddd91b 100644
--- a/components/style_derive/to_css.rs
+++ b/components/style_derive/to_css.rs
@@ -142,6 +142,7 @@ fn where_predicate(ty: syn::Ty) -> syn::WherePredicate {
/// If the first Camel segment is "Moz"" or "Webkit", the result string
/// is prepended with "-".
fn to_css_identifier(mut camel_case: &str) -> String {
+ camel_case = camel_case.trim_right_matches('_');
let mut first = true;
let mut result = String::with_capacity(camel_case.len());
while let Some(segment) = split_camel_segment(&mut camel_case) {