Open bommariusser opened 2 years ago
This has to do with the fact that we use --inner-padding-top/bottom
on the item. This means that any padding is only applied to the default slot. To target the whole item, we would have to use --padding-top/bottom
, but first we need to investigate why this was changed at an earlier point: https://github.com/kirbydesign/designsystem/pull/847/files#diff-ed9293c163f05db6592b5d177a7f9219c243598ebf6ca951c438f59f8a8bf095L12-L13.
@RasmusKjeldgaard does end slot respect it? not sure it does :(
The end slot is inside the 'item-inner' element, that gets the padding, so it should actually respect it:
oki doki @RasmusKjeldgaard det kan godt være man så kan lave en snedig workaround på det :D jeg vender tilbage, tak <3
I think a workaround is to just give the avatar some padding on its own in this case, like so:
<kirby-item>
<kirby-avatar themeColor="danger" size="md" slot="start" style="padding-top: 8px; padding-bottom: 8px">
<kirby-icon name="kirby"></kirby-icon>
</kirby-avatar>
<kirby-label>
<h3>Title</h3>
<p detail>Detail</p>
</kirby-label>
<kirby-label slot="end">
<data>Value</data>
<data detail>Detail</data>
</kirby-label>
</kirby-item>
Describe the enhancement
The padding top/bot of an item medium is normally 8, unless you put an element in start-slot that is higher then 40px. When you put an element like avatar-medium in the start slot it "eats" the padding
Describe the solution you'd like
The start-slot of an item should also respect the items padding (8)
Have you considered any alternatives?
Nope
Are there any additional context?
See screenshot above
Expected behavior should have more padding. see also:
Checklist:
The following tasks should be carried out in sequence in order to follow the process of contributing correctly.
Refinement
Implementation
The contributor who wants to implement this issue should:
Review
Once the issue has been implemented and is ready for review: