Skip to content

react-card: Top padding not removed for CardPreview when used as a first child of a Card #21649

Description

@theerebuss

Actual behavior:

image

Expected behavior:

image

Problem description:

This is caused due to a styling assumption based on the DOM structure, that was broken due to a new Tabster version.
The new version now injects a phantom div into the DOM, breaking the styling assumption that any CardPreview that is :first-child of a Card component, should have their margin-top removed.

CSS selector used in Card: > .fui-CardPreview:first-child

New breaking DOM structure:

<div class="fui-Card" >
    <div tabindex="0" role="none" data-tabster-dummy="" aria-hidden="true" style="position: fixed; height: 1px; width: 1px; top: -100500px; left: -100500px; opacity: 0; z-index: -1; --tabster-dummy-input:yes;"></div>
    <div class="fui-CardPreview">{...}</div>
    <div class="fui-CardHeader">{...}</div>
    <div tabindex="0" role="none" data-tabster-dummy="" aria-hidden="true" style="position: fixed; height: 1px; width: 1px; top: -100500px; left: -100500px; opacity: 0; z-index: -1; --tabster-dummy-input:yes;"></div>
</div>

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions