Skip to content

Commit

Permalink
fix(tile): end slot position when there is no start slot
Browse files Browse the repository at this point in the history
  • Loading branch information
skhamvon authored and dpellier committed Feb 2, 2024
1 parent 22e47ab commit 3a25c67
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,16 @@
width: var(--width);
}

:host(&:not(&--inline)){
:host(&:not(&--inline):has([slot])){
@include osds-tile-on-selected-host {
display: grid;
grid-template-columns: auto 1fr auto;
display: inline-grid;
grid-template: "start center end" / auto 1fr auto;
width: 100%;
}

slot {
display: inline;
}
}

:host(&--rounded){
Expand Down
14 changes: 14 additions & 0 deletions packages/components/src/tile/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@
<span slot="end">-End</span>
</osds-tile>

<p>Slot inline</p>
<osds-tile inline size='md'>
<span slot="start">Start-</span>
<span>tileContent</span>
<span slot="end">-End</span>
</osds-tile>

<p>No Start Slot</p>
<osds-tile size='md'>
<span>tileContent</span>
<span slot="end">-End</span>
</osds-tile>


<p>Color</p>
<osds-tile size='md' color='primary'>Primary</osds-tile>
<osds-tile size='md' color='text'>Text</osds-tile>
Expand Down

0 comments on commit 3a25c67

Please sign in to comment.