{
$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, '.')) {