Generate uncompressed stylesheet in developer mode
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 25 Feb 2021 15:46:31 +0000 (16:46 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 25 Feb 2021 15:46:31 +0000 (16:46 +0100)
wcfsetup/install/files/lib/system/style/StyleCompiler.class.php

index fc1cbcfeece56ce86fc555882d1268086f8f63df..2d71ac04e58d580986f0a3c0dce6c5bc077df1f7 100644 (file)
@@ -69,7 +69,11 @@ final class StyleCompiler extends SingletonFactory
         $compiler->setEncoding('iso8859-1');
         $compiler->setImportPaths([WCF_DIR]);
 
-        $compiler->setOutputStyle(OutputStyle::COMPRESSED);
+        if (\ENABLE_DEBUG_MODE && \ENABLE_DEVELOPER_TOOLS) {
+            $compiler->setOutputStyle(OutputStyle::EXPANDED);
+        } else {
+            $compiler->setOutputStyle(OutputStyle::COMPRESSED);
+        }
 
         return $compiler;
     }