Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove margins from Notice component #54741

Closed
ecgan opened this issue Sep 22, 2023 · 1 comment
Closed

Remove margins from Notice component #54741

ecgan opened this issue Sep 22, 2023 · 1 comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Comments

@ecgan
Copy link
Contributor

ecgan commented Sep 22, 2023

What problem does this address?

Currently the Notice component has margins being defined in its CSS:

Because of the above defined margins, consumers who use the Notice component have to specify their own margins to override this, which is an inconvenient developer experience.

Here's a screenshot from https://wordpress.github.io/gutenberg/?path=/story/components-notice--notice-list-subcomponent - we can see that the Notices are not left-aligned with the checkbox because they have a 15px left margin:

image

This issue can also be seen in the Gutenberg editor, where the Notice component's margin is being overridden with 0:

image

It would be better to have no margins. The spacing of the Notice component should be controlled by the parent layout component.

As an example, we can refer to Ant Design's Alert component. The component does not have any margins. Spacing between multiple Notice components are controlled by the parent layout component.

image

What is your proposed solution?

Remove the margins from the Notice component.

@jordesign jordesign added [Type] Enhancement A suggestion for improvement. [Feature] UI Components Impacts or related to the UI component system labels Sep 24, 2023
@mirka
Copy link
Member

mirka commented Dec 15, 2023

Closed by #54800

@mirka mirka closed this as completed Dec 15, 2023
@mirka mirka added [Package] Components /packages/components and removed [Feature] UI Components Impacts or related to the UI component system labels Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
3 participants