Single File Components (Vue 2)
Plans from $25/month

This lesson is for members. Join us?

Subscribe now and get immediate access to this course, 30 more and all future Vue.js courses!

🚧 NOTICE: You are watching a Vue.js 2 lesson

Scoped Styles

Scoped styles allow us to apply CSS to the components element only. Which ultimately enables us to mix local component and global application styles.

In this lesson, we’ll learn how to use scoped styles in our Single File Components and what to be aware of when using them.

Remember: element selectors should be avoided with scoped styles.

You can benchmark CSS in the CSS Test Creator.