mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
looking for old code
This commit is contained in:
@@ -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>
|
||||
```
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user