Skip to content

Refer to reason why a card has min-width#28061

Merged
XhmikosR merged 1 commit intov4-devfrom
v4-dev-mc-card-min-width
Jan 20, 2019
Merged

Refer to reason why a card has min-width#28061
XhmikosR merged 1 commit intov4-devfrom
v4-dev-mc-card-min-width

Conversation

@MartijnCuppens
Copy link
Member

min-width: 0 is a browser default. There's no reason to add this. (it was added here 891bca4)

@ysds
Copy link
Contributor

ysds commented Jan 17, 2019

The default min-width is auto for flex items. https://developer.mozilla.org/en-US/docs/Web/CSS/min-width

@ysds
Copy link
Contributor

ysds commented Jan 17, 2019

Also see https://developer.mozilla.org/en-US/docs/Web/CSS/flex

By default flex items don't shrink below their minimum content size. To change this, set the item's min-width or min-height.

Should be added a comment for clarify?

@MartijnCuppens
Copy link
Member Author

And auto == 0 (you can check this in devtools in the computed css tab)

@ysds
Copy link
Contributor

ysds commented Jan 17, 2019

See #27095 and https://codepen.io/anon/pen/rogKjz

@MartijnCuppens MartijnCuppens force-pushed the v4-dev-mc-card-min-width branch from a8eff1a to 65d4fe8 Compare January 17, 2019 18:04
@MartijnCuppens MartijnCuppens changed the title Remove redundant min-width from card Refer to reason why a card has min-width Jan 17, 2019
@MartijnCuppens
Copy link
Member Author

Oh, now I see. Didn't remember that. Thanks @ysds! I've refered to the reason why this was added instead.

@XhmikosR XhmikosR merged commit 41f85b6 into v4-dev Jan 20, 2019
@XhmikosR XhmikosR deleted the v4-dev-mc-card-min-width branch January 20, 2019 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants