Skip to content

Margin issue with 'width: 90%' on wide text blocks #2784

Description

@jamiecarter7

When creating a wide text block in the dashboard - I've noticed a strange margin issue.

Its being caused by the following line

width: '90%',

link -> https://github.com/dhis2/dashboard-app/blob/9c6c0c65a20852fd0f1187cc5a359c9180d5b43b/src/components/Item/TextItem/Item.js#L30C19-L30C19

Seems to create a weird styling bug when using the text block in a wide variant resulting in huge X margins. Its caused because the 'width: 90%' of the texy body a ;margin: 0 auto; used to center it.

Screenshot 2023-10-12 at 14 00 04

Screenshot 2023-10-12 at 13 59 55

It means for some strange margins breaking the visual flow of the cards. Here are 2 examples:

Screenshot 2023-10-24 at 16 04 19 Screenshot 2023-10-24 at 16 04 28

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions