WapplerSystems / ws_scss

SASS Compiler for TYPO3
12 stars 24 forks source link

Add strip_tags to ScssViewHelper in case of inline content #72

Open foppelfb opened 1 year ago

foppelfb commented 1 year ago

This is more of a Developer / Integrator usability issue.

When writing inline scss in a FluidTemplate PHPStorm has a hard time formatting the scss code, especially when copy pasting or indenting.

<scss:asset.scss identifier="container-25" forcedOutputLocation="file" scssVariables="{settings.scss}">
        .element-container_25 {
       div {
       padding: 1rem;   
        }
        }
</scss:asset.scss>

A simple <style type="text/scss"> would help:

<scss:asset.scss identifier="container-25" forcedOutputLocation="file" scssVariables="{settings.scss}">
        <style type="text/scss">
        .element-container_25 {
            div {
                padding: 1rem;   
             }
        }
       </style>
</scss:asset.scss>

now PHPStorm will treat that content-block as CSS/SCSS and support indentation and value expansion. this would be a big time-saver

But in order for that to work the <style> Tag would have to be stripped before it is paresed. The attached patch shows a possible example to implement this

WapplerSystemsWsScssAddStripTagsToViewHelper.patch