looking for old code

This commit is contained in:
Kelsey Jackson
2025-08-26 11:35:43 -05:00
parent 8dc90381f6
commit fde32d57c6
3 changed files with 21 additions and 1 deletions

View File

@@ -155,3 +155,18 @@ Use the `appearance` attribute to change the card's visual appearance.
{%- endfor %}
</div>
```
### Orientation
```html {.example}
<div class="wa-grid">
<wa-card orientation="horizontal">
<img
slot="media"
src="https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80"
alt="A kitten sits patiently between a terracotta pot and decorative grasses."
/>
Outlined (default)
</wa-card>
</div>
```

View File

@@ -42,6 +42,11 @@
border-color: transparent;
}
/* Orientation Styles */
:host([orientation='horizontal']) {
display: flex;
}
/* Take care of top and bottom radii */
.media,
:host(:not([with-media])) .header,

View File

@@ -55,7 +55,7 @@ export default class WaCard extends WebAwesomeElement {
render() {
if (this.orientation === 'horizontal') {
return html`horizontal`;
return html`<slot name="media" part="media" class="media"></slot><slot part="body" class="body"></slot>`;
}
return html`
<slot name="media" part="media" class="media"></slot>