borela / naomi

Sublime Text enhanced syntax highlighting for JavaScript ES6/ES7/ES2015/ES2016/ES2017+, Babel, FlowType, React JSX, Styled Components, HTML5, SCSS3, PHP 7, phpDoc, PHPUnit, MQL4. Basic: Git config files.
Other
557 stars 20 forks source link

Stylized Components not properly highlighting #229

Open Blackglade opened 5 years ago

Blackglade commented 5 years ago

The follow doesn't work. I have breakpoints imported at the top and it is a string: @media (max-width: 600px). It also breaks the syntax hightlighting of the content below it.

const StyledInput = styled.div`
    margin: 0 20%;
    display: flex;

    input {
        ${breakpoints} {
            margin: 0 10%;
        }
    }
`
Blackglade commented 5 years ago

@borela Please check the updated issue.

The following works fine:

const StyledInput = styled.div`
    margin: 0 20%;
    display: flex;

    ${breakpoints} {
        margin: 0 10%;
    }
`

but nesting it one level deeper breaks it.