Skip to content
Snippets Groups Projects
Commit ec601ad2 authored by Philipp's avatar Philipp
Browse files

CssGenerator updated

parent 6331c627
No related branches found
No related tags found
No related merge requests found
Pipeline #53676876 failed
......@@ -48,8 +48,10 @@ class CssGenerator
foreach ($percentages as $percentage) {
$maxWidth = 100 / $percentage * $columnMinWidth - 1;
$result[] = sprintf('@media screen and (max-width: %spx){.column.w%sp {width: %s%s;}}',
$maxWidth, $percentage, 100, '%');
$result[] = sprintf('@media screen and (max-width: %spx){
.column.w%sp {width: %s%s;}.column.w%sp.or-center{text-align:center;}
}',
$maxWidth, $percentage, 100, '%', $percentage);
}
return implode("\n", $result);
......@@ -251,12 +253,12 @@ class CssGenerator
$sharedFiles = ['base', 'label', 'menu-and-languages', 'link-and-help', 'color-blink-animations'];
$path = (in_array($type, $sharedFiles, true)) ?
sprintf("%s/webroot/css/%s.generated.%scss", ROOT, $type, $isMobile ? 'mobile.' : null) :
sprintf("%s/webroot/css/%s/%s.css", ROOT, $type, $title);
sprintf("%s/webroot/css/generated/global/%s%s.css", ROOT, $isMobile ? 'mobile/' : null, $type) :
sprintf("%s/webroot/css/generated/page-specific/%s/%s.css", ROOT, $type, $title);
$helperPath = (in_array($type, $sharedFiles, true)) ?
sprintf("%s.generated%s", $type, $isMobile ? '.mobile' : null) :
sprintf("%s/%s", $type, $title);
sprintf("generated/global/%s%s",$isMobile ? 'mobile/' : null, $type) :
sprintf("generated/page-specific/%s/%s", $type, $title);
$file = new \Cake\Filesystem\File($path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment