---
title: Scoped Styles May Not Apply to Teleported Content
impact: MEDIUM
impactDescription: Scoped styles can fail to apply to teleported elements due to data attribute limitations
type: gotcha
tags: [vue3, teleport, scoped-styles, css]
---
# Scoped Styles May Not Apply to Teleported Content
**Impact: MEDIUM** - When using scoped styles with Teleport, the styles may not apply correctly to teleported elements. This is a known limitation related to how Vue's scoped style attributes work with elements rendered outside the component's DOM tree.
## Task Checklist
- [ ] Test scoped styles on teleported content
- [ ] Use `:deep()` selector or non-scoped styles for teleported content
- [ ] Consider CSS modules as an alternative
- [ ] Keep teleported content styles in a separate non-scoped style block
**Problem - Scoped Styles Not Applied:**
```vue
This text may not be styled!
```
**Solution 1 - Use Non-Scoped Styles for Teleported Content:**
```vue
This text will be styled
```
**Solution 2 - Use :deep() Selector:**
```vue
Styled with :deep()
```
**Solution 3 - CSS Modules:**
```vue
Styled with CSS modules
```
## Multi-Root Components with Teleport
Using Teleport as one of multiple root nodes causes additional issues:
```vue
Content
```
Pass classes explicitly to avoid inheritance issues:
```vue