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): compact link icon layout #2082

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions .changeset/clever-webs-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@rhds/elements": patch
---
`<rh-tile>`: fixed layout of compact link tiles with icons
23 changes: 23 additions & 0 deletions elements/rh-tile/demo/link-with-icon.html
bennypowers marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<rh-tile compact desaturated>
<h2 slot="headline"><a href="#top">Compact link tile</a></h2>
<rh-icon slot="icon" set="standard" icon="mug"></rh-icon>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eleifend elit set est egestat, a sollicitudn mauris tincidunt.</p>
</rh-tile>

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

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

<style>
rh-tile {
max-width: 360px;
margin-inline-end: var(--rh-space-md, 8px);
bennypowers marked this conversation as resolved.
Show resolved Hide resolved
margin-block-end: var(--rh-space-md, 8px);
& rh-icon {
color: var(--rh-color-brand-red);
}
}
</style>

6 changes: 5 additions & 1 deletion elements/rh-tile/rh-tile.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
#inner,
#content {
display: flex;
flex-flow: column;
flex-direction: column;
}

.compact #inner {
flex-direction: row;
}

#outer,
Expand Down
Loading