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

[CardHeader] handle wide titles: allow them to wrap #3503

Merged
merged 1 commit into from
Feb 27, 2016
Merged

[CardHeader] handle wide titles: allow them to wrap #3503

merged 1 commit into from
Feb 27, 2016

Conversation

antoinerousseau
Copy link
Contributor

Before:

capture d ecran 2016-02-26 21 53 26

After:

capture d ecran 2016-02-26 21 57 55

@antoinerousseau
Copy link
Contributor Author

(I'm currently adding style={{height: 'auto', whiteSpace: 'nowrap'}} textStyle={{whiteSpace: 'normal', paddingRight: '90px'}} to my CardHeader but I don't see why it couldn't be a default style)

@alitaheri
Copy link
Member

Oh my, before is really ugly! Any chance we can flexbox this?

@antoinerousseau
Copy link
Contributor Author

I'm a flexbox newbie, any hint?

@alitaheri
Copy link
Member

Well there are many cases where we should use flexbox. I think it's best if we merge this now and take care of migrating to flexbox later. 👍

@alitaheri
Copy link
Member

All green here 👍

@callemall/material-ui Feel free to merge guys.

@@ -7,15 +7,18 @@ function getStyles(props, state) {

return {
root: {
height: 72,
height: 'auto',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the default value. Do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well for me the height depends on the content, I don't see why it was fixed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, hard-coding the height to 72 sounds like a bad idea. My point is that 'auto' is the default style value for the height property, we can remove this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes right :)

@mbrookes mbrookes changed the title handle wide titles in card header: allow them to wrap [CardHeader] handle wide titles: allow them to wrap Feb 27, 2016
oliviertassinari added a commit that referenced this pull request Feb 27, 2016
…tles

[CardHeader] handle wide titles: allow them to wrap
@oliviertassinari oliviertassinari merged commit 8ebde43 into mui:master Feb 27, 2016
@oliviertassinari
Copy link
Member

@antoinerousseau Thanks

mbradleyis pushed a commit to staticinstance/material-ui that referenced this pull request Mar 7, 2016
…-titles

[CardHeader] handle wide titles: allow them to wrap
@zannager zannager added the component: card This is the name of the generic UI component, not the React module! label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: card This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants