diff options
| author | Amaury Levé | 2018-06-22 14:41:52 +0200 |
|---|---|---|
| committer | GitHub | 2018-06-22 14:41:52 +0200 |
| commit | 08d6560282dcd46710d7ad2db4ab8a4bb969e116 (patch) | |
| tree | 23826903e1181a36481993b6c4b6100884a6c630 /sonar-css-plugin/src/main/resources/org | |
| parent | 3922c3cd97c13f08bd2ec833e84ac167432d7de8 (diff) | |
| download | sonar-css-08d6560282dcd46710d7ad2db4ab8a4bb969e116.tar.bz2 | |
Rule S4655: '!important' should not be used on 'keyframes' (#61)
Diffstat (limited to 'sonar-css-plugin/src/main/resources/org')
3 files changed, 40 insertions, 0 deletions
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 @@ +<p><code>!important</code> within keyframes declarations is completely ignored in some browsers and therefore it should not be used to be consistent +among all browsers.</p> +<h2>Noncompliant Code Example</h2> +<pre> +@keyframes kf { + from { margin-top: 50px; } + 50% { margin-top: 150px !important; } /* Noncompliant; ignored */ + to { margin-top: 100px; } +} +</pre> +<h2>Compliant Solution</h2> +<pre> +@keyframes kf { + from { margin-top: 50px; } + 50% { margin-top: 150px; } + to { margin-top: 100px; } +} +</pre> +<h2>See</h2> +<ul> + <li> https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes#!important_in_a_keyframe </li> +</ul> + diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4655.json b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4655.json new file mode 100644 index 0000000..75a203f --- /dev/null +++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4655.json @@ -0,0 +1,16 @@ +{ + "title": "\"!important\" should not be used on \"keyframes\"", + "type": "BUG", + "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "1min" + }, + "tags": [ + + ], + "defaultSeverity": "Major", + "ruleSpecification": "RSPEC-4655", + "sqKey": "S4655", + "scope": "Main" +} diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/Sonar_way_profile.json b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/Sonar_way_profile.json index 613e33f..8f0de75 100644 --- a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/Sonar_way_profile.json +++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/Sonar_way_profile.json @@ -4,6 +4,7 @@ "S4647", "S4652", "S4653", + "S4655", "S4663", "S4667" ] |
