Skip to content

VerticalTimelineElement doesn't properly center all icon elements #173

@25zeeshan

Description

@25zeeshan

Problem Description:
The VerticalTimelineElement currently centers only SVG icon elements while causing overflow issues for other types of elements, like img. The current CSS specifically targets SVGs, resulting in sizing and overflow discrepancies for other icon types.

Proposed Solution:
Requesting a modification in the CSS selector from **.vertical-timeline-element-icon svg** to .vertical-timeline-element-icon *, which will apply the centering styles universally to all elements inside the .vertical-timeline-element-icon class.

Reproduction:
For a detailed reproduction run this project in local, github repository - https://github.com/25zeeshan/react-timeline-bug

Visuals:

The icon props here is - <img src="https://fastly.picsum.photos/id/5/200/200.jpg?hmac=oN9VtXdJYLSFssji8vCr48JaI-e5Zi4eH9GAiYBB_Ig" alt="test Imae" />

With current css properties -
scrnli_03_01_2024_02-41-54

After changing svg to * -
scrnli_03_01_2024_02-44-27

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions