From 08d6560282dcd46710d7ad2db4ab8a4bb969e116 Mon Sep 17 00:00:00 2001 From: Amaury Levé Date: Fri, 22 Jun 2018 14:41:52 +0200 Subject: Rule S4655: '!important' should not be used on 'keyframes' (#61) --- .../org/sonar/l10n/css/rules/css/S4655.html | 23 ++++++++++++++++++++++ .../org/sonar/l10n/css/rules/css/S4655.json | 16 +++++++++++++++ .../l10n/css/rules/css/Sonar_way_profile.json | 1 + 3 files changed, 40 insertions(+) create mode 100644 sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4655.html create mode 100644 sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4655.json (limited to 'sonar-css-plugin/src/main/resources') diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4655.html b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4655.html new file mode 100644 index 0000000..e0653cf --- /dev/null +++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4655.html @@ -0,0 +1,23 @@ +
!important within keyframes declarations is completely ignored in some browsers and therefore it should not be used to be consistent
+among all browsers.
+@keyframes kf {
+ from { margin-top: 50px; }
+ 50% { margin-top: 150px !important; } /* Noncompliant; ignored */
+ to { margin-top: 100px; }
+}
+
+
+@keyframes kf {
+ from { margin-top: 50px; }
+ 50% { margin-top: 150px; }
+ to { margin-top: 100px; }
+}
+
+