]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7680
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 5 Aug 2025 10:03:07 +0000 (12:03 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 5 Aug 2025 10:03:07 +0000 (12:03 +0200)
app/Elearning/QuizCompiler.php

index 60e86efed62f545ae1822e92128fddab81e40bf9..9da96b8104723bd0ccbf84a4e2c8a9cf0ce43bd8 100644 (file)
@@ -264,15 +264,15 @@ class QuizCompiler extends Base
     {
         $sass = '';
         foreach ($this->sassVariables as $key => $value) {
-            $sass .= '$' . $key . ': ' . $this->_escapeSassValue($value) . "\n";
+            $sass .= '$' . $key . ': ' . $this->_escapeSassValue($value, $key) . "\n";
         }
         file_put_contents($this->compilePath . '/style/002-item-variables.sass', $sass);
     }
 
-    protected function _escapeSassValue($value)
+    protected function _escapeSassValue($value, $key = '')
     {
         $value = trim($value);
-        if (str_starts_with($value, 'rgb')) {
+        if (str_starts_with($value, 'rgb') || stristr($key, 'opacity')) {
             return $value;
         }
         if (stristr($value, '.')) {