You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I might be misunderstanding how WebC scoped layouts work. I've not had any issues building and nesting WebC components with scoped styles, but the moment I do this with a layout it breaks. This is what I'm trying to do:
---
layout: layouts/info.webc
title: Picks
displayTitle: My top picks
---
## Title
Content goes here
Error:
[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble writing to "_site/picks/index.html" from "./src/picks.md" (via EleventyTemplateError)
[11ty] 2. Could not find any top level <style webc:scoped>in component: ./src/_includes/layouts/info.webc (via Error)
This worked when I used to have styles scoped to layout.webc. It's only the nested version that doesn't want to play ball.
The text was updated successfully, but these errors were encountered:
Am I right in thinking that in normal webc usage, the style scoped to the parent is also applied to the children? If that's the case, this could just be something that's documented because I don't think it makes sense to have scoped styling at the level of layouts.
I think I might be misunderstanding how WebC scoped layouts work. I've not had any issues building and nesting WebC components with scoped styles, but the moment I do this with a layout it breaks. This is what I'm trying to do:
Base layout:
layout.webc
Nested layout:
info.webc
Content:
picks.md
Error:
This worked when I used to have styles scoped to
layout.webc
. It's only the nested version that doesn't want to play ball.The text was updated successfully, but these errors were encountered: