css-flexbox-cheatsheet icon indicating copy to clipboard operation
css-flexbox-cheatsheet copied to clipboard

Support Vue Single File Component (SFC)

Open atilacamurca opened this issue 6 years ago • 3 comments

Vue Single File Component is a .vue file that has the following syntax:

<template>
  <div>hello</div>
</template>
<script>
export default {}
</script>
<style>
.d-flex {
  display: flex;
}
</style>

So, you need to check for the <style></style> tag and enable the plugin if found.

The <style></style> tag may have an lang attribute that tells the language of the style, that can be scss, stylus or css (the default). Without the lang attribute, the default is used.

atilacamurca avatar Sep 12 '19 15:09 atilacamurca

Hey, thanks for trying the extension!

I just wrote a comment in #5 about a similar request but for styled components.

My idea is to find out how VS Code itself detects CSS and implement something similar but I haven't figured that out yet. :)

Thanks for your suggestion. Will definitely give it a try.

dzhavat avatar Sep 12 '19 21:09 dzhavat

I open a similar request on other VS Code extension (https://github.com/Raathigesh/fabulous/issues/10) and I think this should help you. Here's the PR https://github.com/Raathigesh/fabulous/pull/21

atilacamurca avatar Sep 13 '19 11:09 atilacamurca

Thanks for pointing me to those pages. Will definitely take a look. Hopefully this will help me solve my problem.

dzhavat avatar Sep 13 '19 19:09 dzhavat