-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(inline-notification): add 8px right padding if close button is hidden #4873
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
66dbc79
fix(inline-notification): add 1px right margin to action btn
jendowns dc6f95d
Merge branch 'master' into 4864_action-btn
jendowns 19bf1e8
fix(inline-notification): use 8px right padding when close button hidden
jendowns 309a293
Merge branch '4864_action-btn' of github.com:jendowns/carbon into 486…
jendowns 1b321ac
Merge branch 'master' into 4864_action-btn
jendowns 1b7fdc2
fix(inline-notification): apply margin w class when close btn hidden
jendowns 5026d5e
Merge branch 'master' into 4864_action-btn
jendowns 39618ae
Merge branch 'master' into 4864_action-btn
jendowns 0618c4a
Merge branch 'master' into 4864_action-btn
asudoh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you didn't do this via Sass code (and update
className
uponhideCloseButton
)...?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @asudoh -- with the current structure of this component, the action button is a sibling to the close button & therefore it's difficult to target & change the action button when the close button is no longer present.
Adding a class is definitely a good alternative approach. I just went with the solution that (seemed to) add/remove the least. Would you prefer to add a class and keep the padding update in Sass only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for sharing your thoughts @jendowns! I'm thinking about the ability of style override by applications, which tends to lean toward Sass approach. Is it changing
className
uponhideCloseButton
enough to tell the Sass code that the close button is no longer present? If my words here is not clear enough please don't hesitate to speak up - Thanks!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point @asudoh -- I just committed a change that goes the classname + Sass route. Let me know what you think -- thank you!