{"id":21256,"date":"2013-04-19T08:44:40","date_gmt":"2013-04-19T15:44:40","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=21256"},"modified":"2021-08-04T07:43:15","modified_gmt":"2021-08-04T14:43:15","slug":"flex-shrink","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/f\/flex-shrink\/","title":{"rendered":"flex-shrink"},"content":{"rendered":"\n

The flex-shrink<\/code> property is a sub-property of the Flexible Box Layout module<\/a>.<\/p>\n\n\n\n

It specifies the “flex shrink factor” which determines how much the flex item will shrink relative to the rest of the flex items in the flex container when there isn’t enough space on the row.<\/p>\n\n\n\n

.element {\n  flex-shrink: 2;\n}<\/code><\/pre>\n\n\n\n

When omitted, it is set to 1<\/code> and the flex shrink factor is multiplied by the flex basis when distributing negative space.<\/p>\n\n\n

Syntax<\/h3>\n\n\n
flex-shrink: <number><\/code><\/pre>\n\n\n

Demo<\/h3>\n\n\n

To see the full potential of this demo, you would have to be able to resize its width, so please have a look at it on CodePen directly.<\/p>\n\n\n\n