Slotted block elements in dialog's content-top
/content-bottom
slots hug content
#10140
Open
2 of 6 tasks
Labels
0 - new
New issues that need assignment.
ArcGIS Field Apps
Issues logged by ArcGIS Field Apps team members.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
calcite-components
Issues specific to the @esri/calcite-components package.
has workaround
Issues have a workaround available in the meantime.
impact - p2 - want for an upcoming milestone
User set priority impact status of p2 - want for an upcoming milestone
spike
Issues that need quick investigations for time estimations, prioritization, or a quick assessment.
Milestone
Check existing issues
Actual Behavior
If a block element is slotted into a dialog component's
content-top
orcontent-bottom
slots, the element loses its block display and hugs its content as if it was an inline element.Expected Behavior
The slotted block elements maintain their block display.
Reproduction Sample
https://codepen.io/nwhittaker-esri/pen/NWZYLNK
Reproduction Steps
lightpink
background color to judge whether or not they're stretching to fill the width of their container or hugging their content instead.Reproduction Version
2.11.1
Relevant Info
I would question if it's appropriate/expected for components to be placing
<slot>
elements within flex layouts. It's not documented, so it leads to unexpected layouts where block elements don't behave like block elements by default.Additionally, if the user needs a flex layout, they'll likely slot an element with a flex layout anyway since there's no way to fully customize the other flex-related styles on the slot's container.
Regression?
No response
Priority impact
impact - p2 - want for an upcoming milestone
Impact
A workaround is to add
flex: 1
styles to the slotted elements.Calcite package
Esri team
ArcGIS Field Apps
The text was updated successfully, but these errors were encountered: