[TASK] Setting space before/after should use !important 46/22346/3
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 16 Jul 2013 05:04:08 +0000 (07:04 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Tue, 16 Jul 2013 12:34:15 +0000 (14:34 +0200)
If the setting space before/after is used, the generated styles
should use !important to override possible CSS styles done somewhere else.

Change-Id: Ib2cbef280e6d2ac9d1503448ebaede48cf9d159b
Resolves: #50038
Releases: 6.2,6.1,6.0
Reviewed-on: https://review.typo3.org/22346
Reviewed-by: Ralf-Rene Schroeder
Tested-by: Ralf-Rene Schroeder
Reviewed-by: Jo Hasenau
Tested-by: Jo Hasenau
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php

index 09db33e..e318a79 100644 (file)
@@ -1056,10 +1056,10 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                        $constant = (int) $configuration['constant'];
                        if ($configuration['space'] === 'before') {
                                $value = $constant + $this->cObj->data['spaceBefore'];
-                               $declaration = 'margin-top: ' . $value . 'px;';
+                               $declaration = 'margin-top: ' . $value . 'px !important;';
                        } else {
                                $value = $constant + $this->cObj->data['spaceAfter'];
-                               $declaration = 'margin-bottom: ' . $value . 'px;';
+                               $declaration = 'margin-bottom: ' . $value . 'px !important;';
                        }
                        if (!empty($value)) {
                                if ($configuration['classStdWrap.']) {