You are here

public function ThemeGenerator::rewritePageLayoutCSS in AT Tools 8.3

Rewrite the generated layout CSS if it's a float based theme, and remove the float layout.

1 call to ThemeGenerator::rewritePageLayoutCSS()
ThemeGeneratorTypes::starterkitGenerator in at_theme_generator/src/Theme/ThemeGeneratorTypes.php
Generate starter kit type theme.

File

at_theme_generator/src/Theme/ThemeGenerator.php, line 323

Class

ThemeGenerator
Generator form.

Namespace

Drupal\at_theme_generator\Theme

Code

public function rewritePageLayoutCSS() {
  if (file_exists($this->target . '/styles/css/generated/FLOAT.layout.page.css')) {
    $file_path = $this->target . '/styles/css/generated/STARTERKIT.layout.page.css';
    $data = file_get_contents($this->target . '/styles/css/generated/FLOAT.layout.page.css', NULL, NULL, 0, 5000);
    if ($this->layout !== 'flex') {
      $this->fileOperations
        ->fileReplace($data, $file_path);
    }
    unlink($this->target . '/styles/css/generated/FLOAT.layout.page.css');
  }
}