---
title: "CSS in single-file components · vuejs.school"
description: "See what scoped CSS compiles to, reach a child component or slot content on purpose with :deep() and :slotted(), and bind CSS values to state with v-bind()."
canonical_url: "https://vuejs.school/learn/styling/css-in-single-file-components"
meta:
  "og:description": "See what scoped CSS compiles to, reach a child component or slot content on purpose with :deep() and :slotted(), and bind CSS values to state with v-bind()."
  "og:image": "https://vuejs.school/_og/d/a_~Q1NTIGluIHNpbmdsZS1maWxlIGNvbXBvbmVudHMgwrcgdnVlanMuc2Nob29s%2Cc_OgCard.takumi%2Ctitle_CSS%2Bin%2Bsingle-file%2Bcomponents%2Cdescription_~U2VlIHdoYXQgc2NvcGVkIENTUyBjb21waWxlcyB0bywgcmVhY2ggYSBjaGlsZCBjb21wb25lbnQgb3Igc2xvdCBjb250ZW50IG9uIHB1cnBvc2Ugd2l0aCA6ZGVlcCgpIGFuZCA6c2xvdHRlZCgpLCBhbmQgYmluZCBDU1MgdmFsdWVzIHRvIHN0YXRlIHdpdGggdi1iaW5kKCku%2Ceyebrow_~U3R5bGluZyAmIFVJIMK3IExlc3NvbiAxIG9mIDU%2Ctint_lilac%2Cp_Ii9sZWFybi9zdHlsaW5nL2Nzcy1pbi1zaW5nbGUtZmlsZS1jb21wb25lbnRzIg%2Cs_N_Tr6ax9-GzQmjXK.png"
  "og:image:alt": "CSS in single-file components · vuejs.school"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "CSS in single-file components · vuejs.school"
  "twitter:image": "https://vuejs.school/_og/d/a_~Q1NTIGluIHNpbmdsZS1maWxlIGNvbXBvbmVudHMgwrcgdnVlanMuc2Nob29s%2Cc_OgCard.takumi%2Ctitle_CSS%2Bin%2Bsingle-file%2Bcomponents%2Cdescription_~U2VlIHdoYXQgc2NvcGVkIENTUyBjb21waWxlcyB0bywgcmVhY2ggYSBjaGlsZCBjb21wb25lbnQgb3Igc2xvdCBjb250ZW50IG9uIHB1cnBvc2Ugd2l0aCA6ZGVlcCgpIGFuZCA6c2xvdHRlZCgpLCBhbmQgYmluZCBDU1MgdmFsdWVzIHRvIHN0YXRlIHdpdGggdi1iaW5kKCku%2Ceyebrow_~U3R5bGluZyAmIFVJIMK3IExlc3NvbiAxIG9mIDU%2Ctint_lilac%2Cp_Ii9sZWFybi9zdHlsaW5nL2Nzcy1pbi1zaW5nbGUtZmlsZS1jb21wb25lbnRzIg%2Cs_N_Tr6ax9-GzQmjXK.png"
  "twitter:image:alt": "CSS in single-file components · vuejs.school"
---

> Index of every page on this site: [llms.txt](https://vuejs.school/llms.txt)

# **CSS in single-file components**

See what scoped CSS compiles to, reach a child component or slot content on purpose with :deep() and :slotted(), and bind CSS values to state with v-bind().

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://vuejs.school/#website","@type":"WebSite","description":"A free AI-instructed school for Vue.js. Short tutorials, runnable code and quizzes that adapt to you.","name":"vuejs.school","url":"https://vuejs.school/","publisher":{"@id":"https://vuejs.school/#identity"}},{"@id":"https://vuejs.school/learn/styling/css-in-single-file-components#webpage","@type":"WebPage","description":"See what scoped CSS compiles to, reach a child component or slot content on purpose with :deep() and :slotted(), and bind CSS values to state with v-bind().","name":"CSS in single-file components","url":"https://vuejs.school/learn/styling/css-in-single-file-components","breadcrumb":{"@id":"https://vuejs.school/learn/styling/css-in-single-file-components#breadcrumb"},"isPartOf":{"@id":"https://vuejs.school/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://vuejs.school/learn/styling/css-in-single-file-components"]}],"primaryImageOfPage":{"@id":"https://vuejs.school/#logo"}},{"@id":"https://vuejs.school/#identity","@type":"Organization","description":"A free AI-instructed school for Vue.js. Short tutorials, runnable code and quizzes that adapt to you.","name":"vuejs.school","url":"https://vuejs.school","logo":{"@id":"https://vuejs.school/#logo"}},{"@id":"https://vuejs.school/learn/styling/css-in-single-file-components#article","description":"See what scoped CSS compiles to, reach a child component or slot content on purpose with :deep() and :slotted(), and bind CSS values to state with v-bind().","headline":"CSS in single-file components","inLanguage":"en","isAccessibleForFree":true,"thumbnailUrl":"https://vuejs.school/_og/d/a_~Q1NTIGluIHNpbmdsZS1maWxlIGNvbXBvbmVudHMgwrcgdnVlanMuc2Nob29s%2Cc_OgCard.takumi%2Ctitle_CSS%2Bin%2Bsingle-file%2Bcomponents%2Cdescription_~U2VlIHdoYXQgc2NvcGVkIENTUyBjb21waWxlcyB0bywgcmVhY2ggYSBjaGlsZCBjb21wb25lbnQgb3Igc2xvdCBjb250ZW50IG9uIHB1cnBvc2Ugd2l0aCA6ZGVlcCgpIGFuZCA6c2xvdHRlZCgpLCBhbmQgYmluZCBDU1MgdmFsdWVzIHRvIHN0YXRlIHdpdGggdi1iaW5kKCku%2Ceyebrow_~U3R5bGluZyAmIFVJIMK3IExlc3NvbiAxIG9mIDU%2Ctint_lilac%2Cp_Ii9sZWFybi9zdHlsaW5nL2Nzcy1pbi1zaW5nbGUtZmlsZS1jb21wb25lbnRzIg%2Cs_N_Tr6ax9-GzQmjXK.png","@type":["Article","TechArticle"],"articleSection":["Styling"],"author":{"@id":"https://vuejs.school/#identity"},"image":{"@id":"https://vuejs.school/#/schema/image/1"},"isPartOf":{"@id":"https://vuejs.school/learn/styling/css-in-single-file-components#webpage"},"keywords":["\u003Cstyle scoped>",":deep() / :slotted()","v-bind() in CSS","\u003Cstyle module>"],"mainEntityOfPage":{"@id":"https://vuejs.school/learn/styling/css-in-single-file-components#webpage"},"publisher":{"@id":"https://vuejs.school/#identity"}},{"@id":"https://vuejs.school/learn/styling/css-in-single-file-components#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Skill tree","item":"https://vuejs.school/track","position":1},{"@type":"ListItem","name":"Styling & UI","item":"https://vuejs.school/track/styling","position":2},{"@type":"ListItem","name":"CSS in single-file components","position":3}]},{"@id":"https://vuejs.school/#logo","@type":"ImageObject","caption":"vuejs.school","contentUrl":"https://vuejs.school/apple-touch-icon.png","inLanguage":"en","url":"https://vuejs.school/apple-touch-icon.png"},{"@id":"https://vuejs.school/#/schema/image/1","@type":"ImageObject","contentUrl":"https://vuejs.school/_og/d/a_~Q1NTIGluIHNpbmdsZS1maWxlIGNvbXBvbmVudHMgwrcgdnVlanMuc2Nob29s%2Cc_OgCard.takumi%2Ctitle_CSS%2Bin%2Bsingle-file%2Bcomponents%2Cdescription_~U2VlIHdoYXQgc2NvcGVkIENTUyBjb21waWxlcyB0bywgcmVhY2ggYSBjaGlsZCBjb21wb25lbnQgb3Igc2xvdCBjb250ZW50IG9uIHB1cnBvc2Ugd2l0aCA6ZGVlcCgpIGFuZCA6c2xvdHRlZCgpLCBhbmQgYmluZCBDU1MgdmFsdWVzIHRvIHN0YXRlIHdpdGggdi1iaW5kKCku%2Ceyebrow_~U3R5bGluZyAmIFVJIMK3IExlc3NvbiAxIG9mIDU%2Ctint_lilac%2Cp_Ii9sZWFybi9zdHlsaW5nL2Nzcy1pbi1zaW5nbGUtZmlsZS1jb21wb25lbnRzIg%2Cs_N_Tr6ax9-GzQmjXK.png","inLanguage":"en","url":"https://vuejs.school/_og/d/a_~Q1NTIGluIHNpbmdsZS1maWxlIGNvbXBvbmVudHMgwrcgdnVlanMuc2Nob29s%2Cc_OgCard.takumi%2Ctitle_CSS%2Bin%2Bsingle-file%2Bcomponents%2Cdescription_~U2VlIHdoYXQgc2NvcGVkIENTUyBjb21waWxlcyB0bywgcmVhY2ggYSBjaGlsZCBjb21wb25lbnQgb3Igc2xvdCBjb250ZW50IG9uIHB1cnBvc2Ugd2l0aCA6ZGVlcCgpIGFuZCA6c2xvdHRlZCgpLCBhbmQgYmluZCBDU1MgdmFsdWVzIHRvIHN0YXRlIHdpdGggdi1iaW5kKCku%2Ceyebrow_~U3R5bGluZyAmIFVJIMK3IExlc3NvbiAxIG9mIDU%2Ctint_lilac%2Cp_Ii9sZWFybi9zdHlsaW5nL2Nzcy1pbi1zaW5nbGUtZmlsZS1jb21wb25lbnRzIg%2Cs_N_Tr6ax9-GzQmjXK.png"}]}
```