[TASK] Setting space before/after should use !important 57/22357/2
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:35:15 +0000 (14:35 +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/22357
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php

index 9ab4753..7c4949d 100644 (file)
@@ -1033,10 +1033,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.']) {