feat(accordion-item): stretch slotted actions to fill its height#9250
feat(accordion-item): stretch slotted actions to fill its height#9250josercarcamo merged 19 commits intodevfrom
Conversation
|
|
||
| slot[name="actions-start"] { | ||
| block-size: 100%; | ||
| } |
There was a problem hiding this comment.
Is this working @josercarcamo? Do we need some new screenshot tests to account for these changes?
I would have expected either align-items:stretch or align-self:stretch needs to be used to stretch the items by either using the ::slotted selector or some element within the shadow DOM of the component.
Something like:
or
There was a problem hiding this comment.
Yes, it is working, at least with manual testing. I tried the "align-items: stretch" but it didn't work in this case. I actually tried to use the solution in alert.scss as shown below, but it didn't work.
.actions-end { @apply flex self-stretch; }
EDIT: Actually, your suggestion led me to a simpler solution. Testing and will push soon.
There was a problem hiding this comment.
I'm just wondering why this is doing anything. A slot element is just a placeholder and really isn't an element that needs to be styled.
…m:Esri/calcite-design-system into josercarcamo/6565-stretch-slotted-actions
|
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
|
How's this one going @josercarcamo? |
|
@driskull as we discussed on teams, I'll pick this up when the September release nears or I'll try to squeeze it in during down time in some other release. |
|
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
@alisonailea The issue was originally in September, but the above PR was initialized before the milestone started in May. We should be covered for the future work already. 💪🏻 |
|
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
jcfranco
left a comment
There was a problem hiding this comment.
Looking good, @josercarcamo! 😎
| .actions-end { | ||
| @apply flex items-center; | ||
| @apply flex items-stretch; | ||
| * { |
There was a problem hiding this comment.
I think we can skip the * rule because:
- These slots are specifically for actions, which don't have children.
- Overriding user styles for slotted content should be avoided.
There was a problem hiding this comment.
The thing is that
causes all elements below header to have "items-center" so it has to be overridden which is what this line change does. How should we proceed?There was a problem hiding this comment.
Apologies! I thought this was targeting the slotted content. 😅
Sidebar: I still think we can tidy this up to avoid having to override the universal selector elsewhere. We should consider swapping out the universal selector for explicit ones in a follow-up PR.
|
I forgot to mention, before installing, could you update the story to ensure it catches any regression if this style is changed or removed? I didn’t notice any difference when I tested by removing it locally and comparing. |
* origin/dev: (230 commits) chore: release next chore(sort-handle): add messages (#10474) feat(accordion-item): stretch slotted actions to fill its height (#9250) chore: release next feat(dialog, modal, popover, input-date-picker, input-time-picker, sheet): support stacked component sequential closing with escape (#9231) chore: remove commented-out code (#10478) chore: add cssrem VSCode extension recommendation (#10300) docs(accordion-item): fix deprecation tag (#10479) chore: release next feat(stepper-item): update component's active state background color. (#10475) refactor: use `requestAnimationFrame` to replace `readTask` (#10432) chore: release next fix(tip): fix rendering tied to named-slot content (#10470) ci: compile estimate totals per milestone (#10442) chore: release next fix(modal): fix rendering tied to named-slot content (#10469) chore: release next fix(shell-center-row): fix rendering tied to named-slot content (#10451) fix(inline-editable): fix rendering tied to default slot content (#10456) fix(input, input-number, input-text): should not set slotted actions to be disabled (#10458) ...
**Related Issue:** #6565 ## Summary Made the height of the action item 100% so that it fills its available height.
Related Issue: #6565
Summary
Made the height of the action item 100% so that it fills its available height.