Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tile): float footer arrow when footer is empty #2096

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions elements/rh-tile/demo/without-footer-content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<section class="grid">
<rh-tile>
<h2 slot="headline"><a href="#top">Link</a></h2>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Atque tenetur quae omnis beatae, distinctio natus quo hic est iste tempora vitae nesciunt, minus totam itaque modi! Laborum obcaecati soluta sapiente?
</rh-tile>
<rh-tile>
<h2 slot="headline"><a href="#top">Link</a></h2>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Atque tenetur quae omnis beatae, distinctio natus quo hic est iste tempora vitae nesciunt, minus totam itaque modi! Laborum obcaecati soluta sapiente?
</rh-tile>
<rh-tile>
<h2 slot="headline"><a href="#top">Link</a></h2>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Atque tenetur quae omnis beatae, distinctio natus quo hic est iste tempora vitae nesciunt, minus totam itaque modi! Laborum obcaecati soluta sapiente?
</rh-tile>
<rh-tile>
<h2 slot="headline"><a href="#top">Link</a></h2>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Atque tenetur quae omnis beatae, distinctio natus quo hic est iste tempora vitae nesciunt, minus totam itaque modi! Laborum obcaecati soluta sapiente?
</rh-tile>
</section>

<script type="module">
import '@rhds/elements/rh-tile/rh-tile.js';
</script>

<link rel="stylesheet" href="../rh-tile-lightdom.css">

<style>
.grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--rh-space-xl);
padding: var(--rh-space-xl);
}
</style>
6 changes: 6 additions & 0 deletions elements/rh-tile/rh-tile.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@
justify-content: space-between;
align-items: flex-end;
margin-block-start: auto;

&.empty {
position: absolute;
inset-block-end: var(--_padding);
inset-inline-end: var(--_padding);
}
}

#input-outer {
Expand Down
2 changes: 1 addition & 1 deletion elements/rh-tile/rh-tile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export class RhTile extends LitElement {
</div>
</div>
<slot id="body"></slot>
<div id="footer">
<div id="footer" class="${classMap({ empty: this.#slots.isEmpty('footer') })}">
<slot id="footer-text" name="footer"></slot>${this.#renderLinkIcon()}
</div>
</div>
Expand Down
Loading