From d6cf423c13ca35084d832b1bbdd8bfa11bb7ab23 Mon Sep 17 00:00:00 2001 From: Niedziolka Michal Date: Thu, 3 Nov 2022 18:58:10 +0100 Subject: [PATCH] slot element --- schema/html5/web-components.rnc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/schema/html5/web-components.rnc b/schema/html5/web-components.rnc index 5cb3d5d1a..d65f41829 100644 --- a/schema/html5/web-components.rnc +++ b/schema/html5/web-components.rnc @@ -51,5 +51,28 @@ namespace c = "http://n.validator.nu/custom-elements/" ## The "is" attribute common.attrs.other &= attribute is { common.data.custom.element.name }? +## Slot: + + slot.elem.flow = + element slot { slot.inner.flow & slot.attrs } + slot.elem.phrasing = + element slot { slot.inner.phrasing & slot.attrs } + slot.attrs = + ( common.attrs + & slot.attrs.name? + & common.attrs.aria? + ) + slot.attrs.name = + attribute name { + string + } + slot.inner.flow = + ( common.inner.transparent.flow ) + slot.inner.phrasing = + ( common.inner.phrasing ) + + common.elem.flow |= slot.elem.flow + common.elem.phrasing |= slot.elem.phrasing + ## The "slot" attribute common.attrs.other &= attribute slot { text }?