carbon-for-ibm-dotcom
carbon-for-ibm-dotcom copied to clipboard
[Duplicate div in Toast notiication]: Doubles intended margin
Description
The notification content is wrapped with two nested <div class="cds--toast-notification__details">
elements. This results in margin-inline-end: 1rem;
being applied twice, doubling the actual margin.
Component(s) impacted
https://web-components.carbondesignsystem.com/?path=/docs/components-notifications-toast--default
Renders as
The error is here: https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/1df637a7be35d4e8de11899c0f0d7740550cf252/packages/carbon-web-components/src/components/notification/toast-notification.ts#L57-L66
Lines 61 and 63 are not needed because the div is already added here: https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/1df637a7be35d4e8de11899c0f0d7740550cf252/packages/carbon-web-components/src/components/notification/toast-notification.ts#L33-L49 in lines 36 and 47
(Tried to create a pull request but had trouble getting through the checks gauntlet)
Browser
Chrome
Carbon for IBM.com version
v2.10.0
Severity
Severity 3 = The problem is visible or noticeable to users but does not impede the usability or functionality. Affects minor functionality, has a workaround.
Application/website
w3 publisher
Package
@carbon/web-components
CodeSandbox example
you can see it right in the storybook
Steps to reproduce the issue (if applicable)
Inspect the storybook: https://web-components.carbondesignsystem.com/?path=/story/components-notifications-toast--default
Release date (if applicable)
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] I checked the current issues for duplicate issues