Skip to content

Commit e94b737

Browse files
authored
feat: add shadow parts for container elements (#111)
1 parent aa5c840 commit e94b737

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

docs/docs/api/styling.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ The following CSS shadow parts are available:
4040

4141
| Part | Description |
4242
| -------------------------| --------------------------------------------------------|
43-
| `docs-description` | Custom element description |
43+
| `docs-description` | Custom element description placed under the header |
44+
| `docs-container` | The wrapper element placed under the description |
4445
| `docs-column` | Column, child of a `docs-row` part |
45-
| `docs-item` | Item representing a single entry (property, event etc) |
46+
| `docs-item` | Item representing a single entry (property, event etc) |
4647
| `docs-label` | Label (name, attribute, type, description) |
4748
| `docs-markdown` | Iem description with parsed markdown content |
4849
| `docs-row` | Row containing columns. Child of a `docs-item` part |
@@ -69,6 +70,7 @@ The following CSS shadow parts are available:
6970

7071
| Part | Description |
7172
| -------------------------| ------------------------------------------------------- |
73+
| `demo-container` | The wrapper element placed under the header |
7274
| `demo-output` | Wrapper of the rendered component in the live demo |
7375
| `demo-snippet` | Wrapper of the code snippet in the live demo |
7476
| `demo-tabs` | Tabs component used to switch panels in the live demo |

src/api-demo-base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ async function renderDemo(
5656
.cssProps=${data.cssProperties ?? []}
5757
.exclude=${exclude}
5858
.vid=${id}
59+
part="demo-container"
5960
></api-viewer-demo>
6061
`;
6162
}

src/api-docs-base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ async function renderDocs(
5757
.slots=${data.slots ?? []}
5858
.cssParts=${data.cssParts ?? []}
5959
.cssProps=${data.cssProperties ?? []}
60+
part="docs-container"
6061
></api-viewer-docs>
6162
`;
6263
}

src/api-viewer-base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ async function renderDocs(
8888
.slots=${data.slots ?? []}
8989
.cssParts=${data.cssParts ?? []}
9090
.cssProps=${data.cssProperties ?? []}
91+
part="docs-container"
9192
></api-viewer-docs>
9293
`
9394
: html`
@@ -99,6 +100,7 @@ async function renderDocs(
99100
.cssProps=${data.cssProperties ?? []}
100101
.exclude=${exclude}
101102
.vid=${id}
103+
part="demo-container"
102104
></api-viewer-demo>
103105
`
104106
)}

0 commit comments

Comments
 (0)