Skip to content

Add strip_tags to ScssViewHelper in case of inline content #72

@foppelfb

Description

@foppelfb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions