mxw / vim-jsx

React JSX syntax highlighting and indenting for vim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for <style jsx>?

danawoodman opened this issue · comments

How could support for embedded styled JSX style tags work? Eg:

    <style jsx>{`
      h1, a {
        font-family: "Arial";
      }

      ul {
        padding: 0;
      }

      li {
        list-style: none;
        margin: 5px 0;
      }

      a {
        text-decoration: none;
        color: blue;
      }

      a:hover {
        opacity: 0.6;
      }
    `}</style>

You can probably do a similar trick with importing the CSS syntax package, and jumping into it when you see the <style jsx> tag (with higher precedence than regular JSX tags, of course). Feel free to try putting up a PR.