Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single File Component Format: add support for <style scoped> #93

Merged
merged 4 commits into from
Mar 25, 2018
Merged

Single File Component Format: add support for <style scoped> #93

merged 4 commits into from
Mar 25, 2018

Conversation

mrjones2014
Copy link
Contributor

add support for the <style scoped> tag in the single file component format

@rafaesc
Copy link
Member

rafaesc commented Mar 19, 2018

Amazing job!

Thanks for the PR, can you add a documentation of this feature, on this page?

https://github.com/vue-styleguidist/vue-styleguidist/blob/master/docs/Documenting.md#usage-examples-and-readme-files

Regards!

@mrjones2014
Copy link
Contributor Author

@rafaesc added the requested documentation!

@rafaesc
Copy link
Member

rafaesc commented Mar 19, 2018

Thank @mrjones2014

I will review it

@rafaesc rafaesc merged commit d896578 into vue-styleguidist:master Mar 25, 2018
@rafaesc
Copy link
Member

rafaesc commented Mar 25, 2018

Awesome job,

only I added scopeId to add the classname the easier
https://github.com/vue-styleguidist/vue-styleguidist/blob/master/src/rsg-components/Preview/Preview.js#L168

image

@nicooprat
Copy link

Looks like scoped attribute messes with before/after pseudo selectors, here's what is output:

<style data-cssscoper="true">
.wrapper[data-v-2011] {
  background-color: red;
}
.wrapper:before[data-v-2011] {
  content: '';
}
</style>

The second selector should be:

.wrapper[data-v-2011]:before

Did I miss something? Should i open a new issue? Thanks.

@elevatebart
Copy link
Member

Hello nicooprat, yes if you think it’s a bug you should. And I believe this is a bug in our scoped polyfill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants