-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Core] Add margin back to NonIdealState component #2544
Conversation
add margin back to NonIdealState componentPreview: documentation | landing | table |
@jkillian why not upgrade your NIS container to be flex instead? |
Definitely could! Or I could just add this line of CSS to my app's CSS. I just don't want users who upgrade to BP3 to have to deal with this breaking change unnecessarily. |
I guess it's more of a philosophical question. I personally would prefer Blueprint 3 to be full flex and React 16 only, but that's not possible. So just like we're in between React 15 and 16, I wonder whether it makes sense to be in between flex and non flex |
i only removed this line cuz it conflicted with an earlier attempt at the example frame styles. it's actually not a conflict anymore (jason and i discovered this offline). |
@@ -23,6 +23,7 @@ Styleguide non-ideal-state | |||
@include pt-flex-container(column, $pt-grid-size * 2); | |||
align-items: center; | |||
justify-content: center; | |||
margin: 0 auto; | |||
width: 100%; | |||
max-width: $pt-grid-size * 40; |
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.
@jkillian 🤔 i wonder if your layout issue would be resolved by also removing the max-width instead of re-adding this margin?
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.
hmm, w/o max width though, I believe description lines of text won't wrap and will be awkwardly long.
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.
we can move the width to those elements rather than on the container?
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 seems more sound to me. setting margin and width on a root element affects its layout wrt other elements, so i'd like to avoid that.
move max-width to children, remove marginPreview: documentation | landing | table |
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.
merging this so it can be in RC
Sorry, just getting to this now. Seems reasonable to me! 👍 |
Changes proposed in this pull request:
auto
horizontal margins onNonIdealState
s were removed between the3.0.0-beta.0
and3.0.0-beta.1
releases, causing visual breaks for users which were relying on that to do centering. This PR brings that margin back.