Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                mixin container(className, float)
  .container(class=className)
    .item.foo(class=float ? 'block-item' : 'flex-item')
      span.item-width
      span.text
    .item.bar(class=float ? 'block-item' : 'flex-item')
      span.item-width
      span.text
    .item.baz(class=float ? 'block-item' : 'flex-item')
      span.item-width
      span.text

.wrapper
  - var i = 0
  .measure
    while i < 36
      .unit
        - i++
  span.desc
    | block & float
    br
    span.ok
      | 60 + 120 + 180
  +container('block-container', true)
  span.desc
    | flex-grow 1:2:3 & width auto
    br
    | 360 - (40 + 40 + 40) = 240
    br
    | (40 + 1/6 * 240) + (40 + 2/6 * 240) + (40 + 3/6 * 240)
    br
    span.ok
      | 80 + 120 + 160
  +container('flex-grow-container-widthauto')
  span.desc
    | flex-grow 1:2:3 & width auto & padding 20
    br
    | 360 - (80 + 80 + 80) = 120
    br
    | (80 + 1/6 * 120) + (80 + 2/6 * 120) + (80 + 3/6 * 120)
    br
    span.ok
      | 100 + 120 + 140
  +container('flex-grow-container-widthauto-padding20')
  span.desc
    | flex-grow 1:2:3 & width auto & margin 20
    br
    | 360 - (80 + 80 + 80) = 240
    br
    | (80 + 1/6 * 240) + (80 + 2/6 * 240) + (80 + 3/6 * 240)
    br
    span.ok
      | 60 + 80 + 100 + (margin 120)
  +container('flex-grow-container-widthauto-margin20')
  span.desc
    | flex-grow 1:2:3 & basis 0
    br
    | 360 - (0 + 0 + 0) = 360
    br
    | (0 + 1/6 * 360) + (0 + 2/6 * 360) + (0 + 3/6 * 360)
    br
    span.ok
      | 60 + 120 + 180
  +container('flex-grow-container-basis0')
  span.desc
    | flex-grow 1:5:6 & basis 0
    br
    | 360 - (0 + 0 + 0) = 360
    br
    | (0 + 1/12 * 360) + (0 + 5/12 * 360) + (0 + 6/12 * 360)
    br
    span.warn 30 + 150 + 180 [IE11]
    br
    | (40-10) + (150) + (180)
    br
    | (40) + (0 + 5/11 * 320) + (0 + 6/11 * 320)
    br
    span.warn 40 + 145.4545... + 174.5454... [Chrome, Firefox, Safari, Edge]
  +container('flex-grow-container-basis0-1_5_6')
  span.desc
    | flex-grow 1:2:3 & basis 0 & content 80
    br
    | 360 - (0 + 0 + 0) = 360
    br
    | (0 + 1/6 * 360) + (0 + 2/6 * 360) + (0 + 3/6 * 360)
    br
    span.warn 60 + 120 + 180 [IE11]
    br
    | (80-20) + (120) + (180)
    br
    | (80) + (0 + 2/5 * 280) + (0 + 3/5 * 280)
    br
    span.warn 80 + 112 + 168 [Chrome, Firefox, Safari, Edge]
  +container('flex-grow-container-basis0-content80')
  span.desc
    | flex-grow 1:2:3 & basis 0 & content 120
    br
    | 360 - (0 + 0 + 0) = 360
    br
    | (0 + 1/6 * 360) + (0 + 2/6 * 360) + (0 + 3/6 * 360)
    br
    span.warn 60 + 120 + 180 [IE11]
    br
    | (120-60) + (120) + (180)
    br
    | (120) + (0 + 2/5 * 240) + (0 + 3/5 * 240)
    br
    | (120) + (96) + (144)
    br
    | (120) + (120 - 24) + (144)
    br
    span.warn 120 + 120 + 120 [Chrome, Firefox, Safari, Edge]
  +container('flex-grow-container-basis0-content120')
  span.desc
    | flex-grow 1:2:3 & basis 0 & content 160
    br
    | 360 - (0 + 0 + 0) = 360
    br
    | (0 + 1/6 * 360) + (0 + 2/6 * 360) + (0 + 3/6 * 360)
    br
    span.warn 60 + 120 + 180 [IE11]
    br
    | (160-100) + (160-40) + (180)
    br
    | (160) + (160) + (180-140)
    br
    span.warn 160 + 160 + 160 [Chrome, Firefox, Safari, Edge]
  +container('flex-grow-container-basis0-content160')
  span.desc
    | flex-grow 1:2:3 & width 0
    br
    | 360 - (0 + 0 + 0) = 360
    br
    | (0 + 1/6 * 360) + (0 + 2/6 * 360) + (0 + 3/6 * 360)
    br
    span.ok
      | 60 + 120 + 180
  +container('flex-grow-container-width0')
  span.desc
    | flex-grow 1:5:6 & width 0
    br
    | 360 - (0 + 0 + 0) = 360
    br
    | (0 + 1/12 * 360) + (0 + 5/12 * 360) + (0 + 6/12 * 360)
    br
    span.ok 30 + 150 + 180
  +container('flex-grow-container-width-1_5_6')
  span.desc
    | flex-grow 1:2:3 & width 0 & content 80
    br
    | 360 - (0 + 0 + 0) = 360
    br
    | (0 + 1/6 * 360) + (0 + 2/6 * 360) + (0 + 3/6 * 360)
    br
    span.ok 60 + 120 + 180
  +container('flex-grow-container-width0-content80')
  span.desc
    | flex-grow 1:2:3 & width 0 & content 120
    br
    | 360 - (0 + 0 + 0) = 360
    br
    | (0 + 1/6 * 360) + (0 + 2/6 * 360) + (0 + 3/6 * 360)
    br
    span.ok 60 + 120 + 180
  +container('flex-grow-container-width0-content120')
  span.desc
    | flex-grow 1:2:3 & width 0 & content 160
    br
    | 360 - (0 + 0 + 0) = 360
    br
    | (0 + 1/6 * 360) + (0 + 2/6 * 360) + (0 + 3/6 * 360)
    br
    span.ok 60 + 120 + 180
  +container('flex-grow-container-width0-content160')
  span.desc
    | flex-grow 1:2:3 & width 0 & padding 20
    br
    | 360 - (40 + 40 + 40) = 240
    br
    | (40 + 1/6 * 240) + (40 + 2/6 * 240) + (40 + 3/6 * 240)
    br
    span.ok
      | 80 + 120 + 160
  +container('flex-grow-container-width0-padding20')
  span.desc
    | flex-grow 1:2:3 & width 0 & margin 20
    br
    | 360 - (40 + 40 + 40) = 240
    br
    | (40 + 1/6 * 240) + (40 + 2/6 * 240) + (40 + 3/6 * 240)
    br
    span.ok
      | 40 + 80 + 120 + (margin 120)
  +container('flex-grow-container-width0-margin20')
  span.desc
    | block & float
    br
    span.ok
      | 120 + 120 + 120
  +container('block-container-120', true)
  span.desc
    | flex-shrink 1:2:3 & basis 160
    br
    | 360 - (160 + 160 + 160) = -120
    br
    | (160 - 1/6 * 120) + (160 - 2/6 * 120) + (160 - 3/6 * 120)
    br
    span.ok
      | 140 + 120 + 100
  +container('flex-shrink-container-basis160')
  span.desc
    | flex-shrink 1:2:3 & basis 200
    br
    | 360 - (200 + 200 + 200) = -240
    br
    | (200 - 1/6 * 240) + (200 - 2/6 * 240) + (200 - 3/6 * 240)
    br
    span.ok
      | 160 + 120 + 80
  +container('flex-shrink-container-basis200')
  span.desc
    | flex-shrink 1:2:3 & basis 360
    br
    | 360 - (360 + 360 + 360) = -720
    br
    | (360 - 1/6 * 720) + (360 - 2/6 * 720) + (360 - 3/6 * 720)
    br
    span.warn 240 + 120 + 0 [IE11]
    br
    | (240) + (120) + (40-40)
    br
    | (240 - 1/3 * 40) + (120 - 2/3 * 40) + (40)
    br
    sapn.warn 226.6666... + 93.3333... + 40 [Chrome, Firefox, Safari, Edge]
  +container('flex-shrink-container-basis360')
  span.desc
    | flex-shrink 1:2:3 & basis 360 & min-width 0
    br
    | 360 - (360 + 360 + 360) = -720
    br
    | (360 - 1/6 * 720) + (360 - 2/6 * 720) + (360 - 3/6 * 720)
    br
    span.ok 240 + 120 + 0
  +container('flex-shrink-container-basis360-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & width 160
    br
    | 360 - (160 + 160 + 160) = -120
    br
    | (160 - 1/6 * 120) + (160 - 2/6 * 120) + (160 - 3/6 * 120)
    br
    span.ok
      | 140 + 120 + 100
  +container('flex-shrink-container-width160')
  span.desc
    | flex-shrink 1:2:3 & width 200
    br
    | 360 - (200 + 200 + 200) = -240
    br
    | (200 - 1/6 * 240) + (200 - 2/6 * 240) + (200 - 3/6 * 240)
    br
    span.ok
      | 160 + 120 + 80
  +container('flex-shrink-container-width200')
  span.desc
    | flex-shrink 1:2:3 & width 360
    br
    | 360 - (360 + 360 + 360) = -720
    br
    | (360 - 1/6 * 720) + (360 - 2/6 * 720) + (360 - 3/6 * 720)
    br
    span.warn 240 + 120 + 0 [IE11]
    br
    | (240) + (120) + (40-40)
    br
    | (240 - 1/3 * 40) + (120 - 2/3 * 40) + (40)
    br
    sapn.warn 226.6666... + 93.3333... + 40 [Chrome, Firefox, Safari, Edge]
  +container('flex-shrink-container-width360')
  span.desc
    | flex-shrink 1:2:3 & width 360 & min-width 0
    br
    | 360 - (360 + 360 + 360) = -720
    br
    | (360 - 1/6 * 720) + (360 - 2/6 * 720) + (360 - 3/6 * 720)
    br
    span.ok 240 + 120 + 0
  +container('flex-shrink-container-width360-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & padding 20
    br
    | 360 - (200 + 200 + 200) = -240
    br
    | (200 - 1/6 * 240) + (200 - 2/6 * 240) + (200 - 3/6 * 240)
    br
    span.ok
      | 160 + 120 + 80
  +container('flex-shrink-container-basis160-padding20')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & margin 20
    br
    | 360 - (200 + 200 + 200) = -240
    br
    | (200 - 1/6 * 240) + (200 - 2/6 * 240) + (200 - 3/6 * 240)
    br
    span.ok
      | 120 + 80 + 40 + (margin 120)
  +container('flex-shrink-container-basis160-margin20')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & padding 40
    br
    | 360 - (240 + 240 + 240) = -360
    br
    | (240 - 1/6 * 360) + (240 - 2/6 * 360) + (240 - 3/6 * 360)
    br
    | (180) + (120) + (60)
    br
    | (180) + (120) + (120-60) #[span.warn |] (180) + (120) + (80 - 20)
    br
    | (180-60) + (120) + (120) #[span.warn |] (180 - 1/3 * 20) + (120 - 2/3 * 20)
    br
    span.warn
      |120 + 120 + 120 [Chrome, Firefox, Safari, Edge]
      br
      | 173.3333... + 106.6666... + 80 [IE11]
  +container('flex-shrink-container-basis160-padding40')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & padding 40 & min-width 0
    br
    | 360 - (240 + 240 + 240) = -360
    br
    | (240 - 1/6 * 360) + (240 - 2/6 * 360) + (240 - 3/6 * 360)
    br
    | (180) + (120) + (60)
    br
    | (180) + (120) + (80 - 20)
    br
    | (180 - 1/3 * 20) + (120 - 2/3 * 20)
    br
    span.ok 173.3333... + 106.6666... + 80
  +container('flex-shrink-container-basis160-padding40-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & margin 40
    br
    | 360 - (240 + 240 + 240) = -360
    br
    | (240 - 1/6 * 360) + (240 - 2/6 * 360) + (240 - 3/6 * 360)
    br
    | (180) + (120) + (60)
    br
    | (180) + (120) + (120-60) #[span.warn |] (180) + (120) + (80 - 20)
    br
    | (180-60) + (120) + (120) #[span.warn |] (180 - 1/3 * 20) + (120 - 2/3 * 20) + (80)
    br
    span.warn
      | 40 + 40 + 40 + (margin 240) [Chrome, Firefox, Safari, Edge]
      br
      | 93.3333... + 26.6666... + 0 + (margin 240) [IE11]
  +container('flex-shrink-container-basis160-margin40')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & margin 40 & min-width 0
    br
    | 360 - (240 + 240 + 240) = -360
    br
    | (240 - 1/6 * 360) + (240 - 2/6 * 360) + (240 - 3/6 * 360)
    br
    | (180) + (120) + (60)
    br
    | (180) + (120) + (80 - 20)
    br
    | (180 - 1/3 * 20) + (120 - 2/3 * 20) + (80)
    br
    span.ok 93.3333... + 26.6666... + 0 + (margin 240)
  +container('flex-shrink-container-basis160-margin40-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & padding 50
    br
    | 360 - (260 + 260 + 260) = -420
    br
    | (260 - 1/6 * 420) + (260 - 2/6 * 420) + (260 - 3/6 * 420)
    br
    | (190) + (120) + (50)
    br
    | (190) + (140-20) + (140-90) #[span.warn |] (190) + (120) + (100 - 50)
    br
    | (190-110) + (140) + (140) #[span.warn |] (190 - 1/3 * 50) + (120 - 2/3 * 50) + (100)
    br
    span.warn
      | 140 + 140 + 140 [Chrome, Firefox, Safari, Edge] | 
    | (173.3333...) + (86.6666...) + (100)
    br
    | (173.3333...) + (100 - 13.3333...) + (100)
    br
    span.warn 160 + 100 + 100 [IE11]
  +container('flex-shrink-container-basis160-padding50')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & padding 50 & min-width 0
    br
    | 360 - (260 + 260 + 260) = -420
    br
    | (260 - 1/6 * 420) + (260 - 2/6 * 420) + (260 - 3/6 * 420)
    br
    | (190) + (120) + (50)
    br
    | (190) + (120) + (100 - 50)
    br
    | (190 - 1/3 * 50) + (120 - 2/3 * 50) + (100)
    br
    | (173.3333...) + (86.6666...) + (100)
    br
    | (173.3333...) + (100 - 13.3333...) + (100)
    br
    span.ok 160 + 100 + 100
  +container('flex-shrink-container-basis160-padding50-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & margin 50
    br
    | 360 - (260 + 260 + 260) = -420
    br
    | (260 - 1/6 * 420) + (260 - 2/6 * 420) + (260 - 3/6 * 420)
    br
    | (190) + (120) + (50)
    br
    | (190) + (140-20) + (140-90) #[span.warn |] (190) + (120) + (100-50)
    br
    | (190 - 110) + (140) + (140) #[span.warn |] (190 - 1/3 * 50) + (120 - 2/3 * 50) + (100)
    br
    span.warn
      | 40 + 40 + 40 + (marign 240)[Chrome, Firefox, Safari, Edge] | 
    | (173.3333...) + (86.6666...) + (100)
    br
    | (173.3333...) + (100 - 13.3333...) + (100)
    br
    span.warn
      | 60 + 0 + 0 + (margin 300) [IE11]
  +container('flex-shrink-container-basis160-margin50')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & margin 50 & min-width 0
    br
    | 360 - (260 + 260 + 260) = -420
    br
    | (260 - 1/6 * 420) + (260 - 2/6 * 420) + (260 - 3/6 * 420)
    br
    | (190) + (120) + (50)
    br
    | (190) + (120) + (100-50)
    br
    | (190 - 1/3 * 50) + (120 - 2/3 * 50) + (100)
    br
    | (173.3333...) + (86.6666...) + (100)
    br
    | (173.3333...) + (100 - 13.3333...) + (100)
    br
    span.ok 60 + 0 + 0 + (margin 300)
  +container('flex-shrink-container-basis160-margin50-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & padding 70 & border-box
    br
    span.warn
      | 140 + 140 + 140 [IE11]
      br
      | 180 + 180 + 180 [Chrome, Firefox, Safari, Edge]
  +container('flex-shrink-container-basis160-padding70-borderbox')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & padding 70 & border-box & min-width 0
    br
    span.ok 140 + 140 + 140
  +container('flex-shrink-container-basis160-padding70-borderbox-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & width 160 & padding 20
    br
    | 360 - (200 + 200 + 200) = -240
    br
    | (200 - 1/6 * 240) + (200 - 2/6 * 240) + (200 - 3/6 * 240)
    br
    span.ok
      | 160 + 120 + 80
  +container('flex-shrink-container-width160-padding20')
  span.desc
    | flex-shrink 1:2:3 & width 160 & margin 20
    br
    | 360 - (200 + 200 + 200) = -240
    br
    | (200 - 1/6 * 240) + (200 - 2/6 * 240) + (200 - 3/6 * 240)
    br
    span.ok
      | 120 + 80 + 40 + (margin 120)
  +container('flex-shrink-container-width160-margin20')
  span.desc
    | flex-shrink 1:2:3 & width 160 & padding 40
    br
    | 360 - (240 + 240 + 240) = -360
    br
    | (240 - 1/6 * 360) + (240 - 2/6 * 360) + (240 - 3/6 * 360)
    br
    | (180) + (120) + (60)
    br
    | (180) + (120) + (120-60) #[span.warn |] (180) + (120) + (80 - 20)
    br
    | (180-60) + (120) + (120) #[span.warn |] (180 - 1/3 * 20) + (120 - 2/3 * 20)
    br
    span.warn
      |120 + 120 + 120 [Chrome, Firefox, Safari, Edge]
      br
      | 173.3333... + 106.6666... + 80 [IE11]
  +container('flex-shrink-container-width160-padding40')
  span.desc
    | flex-shrink 1:2:3 & width 160 & padding 40 & min-width 0
    br
    | 360 - (240 + 240 + 240) = -360
    br
    | (240 - 1/6 * 360) + (240 - 2/6 * 360) + (240 - 3/6 * 360)
    br
    | (180) + (120) + (60)
    br
    | (180) + (120) + (80 - 20)
    br
    | (180 - 1/3 * 20) + (120 - 2/3 * 20)
    br
    span.ok 173.3333... + 106.6666... + 80
  +container('flex-shrink-container-width160-padding40-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & width 160 & margin 40
    br
    | 360 - (240 + 240 + 240) = -360
    br
    | (240 - 1/6 * 360) + (240 - 2/6 * 360) + (240 - 3/6 * 360)
    br
    | (180) + (120) + (60)
    br
    | (180) + (120) + (120-60) #[span.warn |] (180) + (120) + (80 - 20)
    br
    | (180-60) + (120) + (120) #[span.warn |] (180 - 1/3 * 20) + (120 - 2/3 * 20) + (80)
    br
    span.warn
      | 40 + 40 + 40 + (margin 240) [Chrome, Firefox, Safari, Edge]
      br
      | 93.3333... + 26.6666... + 0 + (margin 240) [IE11]
  +container('flex-shrink-container-width160-margin40')
  span.desc
    | flex-shrink 1:2:3 & width 160 & margin 40 & min-width 0
    br
    | 360 - (240 + 240 + 240) = -360
    br
    | (240 - 1/6 * 360) + (240 - 2/6 * 360) + (240 - 3/6 * 360)
    br
    | (180) + (120) + (60)
    br
    | (180) + (120) + (80 - 20)
    br
    | (180 - 1/3 * 20) + (120 - 2/3 * 20) + (80)
    br
    span.ok 93.3333... + 26.6666... + 0 + (margin 240)
  +container('flex-shrink-container-width160-margin40-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & width 160 & padding 50
    br
    | 360 - (260 + 260 + 260) = -420
    br
    | (260 - 1/6 * 420) + (260 - 2/6 * 420) + (260 - 3/6 * 420)
    br
    | (190) + (120) + (50)
    br
    | (190) + (140-20) + (140-90) #[span.warn |] (190) + (120) + (100 - 50)
    br
    | (190-110) + (140) + (140) #[span.warn |] (190 - 1/3 * 50) + (120 - 2/3 * 50) + (100)
    br
    span.warn
      | 140 + 140 + 140 [Chrome, Firefox, Safari, Edge] | 
    | (173.3333...) + (86.6666...) + (100)
    br
    | (173.3333...) + (100 - 13.3333...) + (100)
    br
    span.warn 160 + 100 + 100 [IE11]
  +container('flex-shrink-container-width160-padding50')
  span.desc
    | flex-shrink 1:2:3 & width 160 & padding 50 & min-width 0
    br
    | 360 - (260 + 260 + 260) = -420
    br
    | (260 - 1/6 * 420) + (260 - 2/6 * 420) + (260 - 3/6 * 420)
    br
    | (190) + (120) + (50)
    br
    | (190) + (120) + (100 - 50)
    br
    | (190 - 1/3 * 50) + (120 - 2/3 * 50) + (100)
    br
    | (173.3333...) + (86.6666...) + (100)
    br
    | (173.3333...) + (100 - 13.3333...) + (100)
    br
    span.ok 160 + 100 + 100
  +container('flex-shrink-container-width160-padding50-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & width 160 & margin 50
    br
    | 360 - (260 + 260 + 260) = -420
    br
    | (260 - 1/6 * 420) + (260 - 2/6 * 420) + (260 - 3/6 * 420)
    br
    | (190) + (120) + (50)
    br
    | (190) + (140-20) + (140-90) #[span.warn |] (190) + (120) + (100-50)
    br
    | (190 - 110) + (140) + (140) #[span.warn |] (190 - 1/3 * 50) + (120 - 2/3 * 50) + (100)
    br
    span.warn
      | 40 + 40 + 40 + (marign 240)[Chrome, Firefox, Safari, Edge] | 
    | (173.3333...) + (86.6666...) + (100)
    br
    | (173.3333...) + (100 - 13.3333...) + (100)
    br
    span.warn
      | 60 + 0 + 0 + (margin 300) [IE11]
  +container('flex-shrink-container-width160-margin50')
  span.desc
    | flex-shrink 1:2:3 & width 160 & margin 50 & min-width 0
    br
    | 360 - (260 + 260 + 260) = -420
    br
    | (260 - 1/6 * 420) + (260 - 2/6 * 420) + (260 - 3/6 * 420)
    br
    | (190) + (120) + (50)
    br
    | (190) + (120) + (100-50)
    br
    | (190 - 1/3 * 50) + (120 - 2/3 * 50) + (100)
    br
    | (173.3333...) + (86.6666...) + (100)
    br
    | (173.3333...) + (100 - 13.3333...) + (100)
    br
    span.ok 60 + 0 + 0 + (margin 300)
  +container('flex-shrink-container-width160-margin50-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & width 160 & padding 70 & border-box
    br
    span.warn
      | 140 + 140 + 140 [IE11]
      br
      | 180 + 180 + 180 [Chrome, Firefox, Safari, Edge]
  +container('flex-shrink-container-width160-padding70-borderbox')
  span.desc
    | flex-shrink 1:2:3 & width 160 & padding 70 & border-box & min-width 0
    br
    span.ok 140 + 140 + 140
  +container('flex-shrink-container-width160-padding70-borderbox-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & basis 0
    br
    span.warn
      | 0 + 0 + 0 [IE11]
    br
    | (40-40) + (40-40) + (40-40)
    br
    span.warn
      | 40 + 40 + 40 [Chrome, Firefox, Safari, Edge]
  +container('flex-shrink-container-basis0')
  span.desc
    | flex-shrink 1:2:3 & width 0
    br
    span.ok
      | 0 + 0 + 0
  +container('flex-shrink-container-width0')
  span.desc
    | flex-shrink 1:2:3 & basis 0 & content 160
    br
    span.warn
      | 160 + 160 + 160 [Chrome, Firefox, Safari, Edge]
      br
      | 0 + 0 + 0 [IE11]
  +container('flex-shrink-container-basis0-content160')
  span.desc
    | flex-shrink 1:2:3 & width 0 & content 160
    br
    span.ok 0 + 0 + 0
  +container('flex-shrink-container-width0-content160')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & content 160
    br
    span.warn 160 + 160 + 160 [Chrome, Firefox, Safari, Edge]
    br
    | 360 - (160 + 160 + 160) = -120
    br
    | (160 - 1/6 * 120) + (160 - 2/6 * 120) + (160 - 3/6 * 120)
    br
    span.warn 140 + 120 + 100 [IE11]
  +container('flex-shrink-container-basis160-content160')
  span.desc
    | flex-shrink 1:2:3 & basis 160 & content 160 & min-width 0
    br
    | 360 - (160 + 160 + 160) = -120
    br
    | (160 - 1/6 * 120) + (160 - 2/6 * 120) + (160 - 3/6 * 120)
    br
    span.ok 140 + 120 + 100
  +container('flex-shrink-container-basis160-content160-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & width 160 & content 160
    br
    span.warn 160 + 160 + 160 [Chrome, Firefox, Safari, Edge]
    br
    | 360 - (160 + 160 + 160) = -120
    br
    | (160 - 1/6 * 120) + (160 - 2/6 * 120) + (160 - 3/6 * 120)
    br
    span.warn 140 + 120 + 100 [IE11]
  +container('flex-shrink-container-width160-content160')
  span.desc
    | flex-shrink 1:2:3 & width 160 & content 160 & min-width 0
    br
    | 360 - (160 + 160 + 160) = -120
    br
    | (160 - 1/6 * 120) + (160 - 2/6 * 120) + (160 - 3/6 * 120)
    br
    span.ok 140 + 120 + 100
  +container('flex-shrink-container-width160-content160-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & width 0 & padding 40
    br
    span.ok
      | 80 + 80 + 80
  +container('flex-shrink-container-width0-padding40')
  span.desc
    | flex-shrink 1:2:3 & width 0 & margin 40
    br
    span.ok
      | 0 + 0 + 0 + (margin 240)
  +container('flex-shrink-container-width0-margin40')
  span.desc
    | flex-shrink 1:2:3 & width 0 & padding 60
    br
    span.ok
      | 120 + 120 + 120
  +container('flex-shrink-container-width0-padding60')
  span.desc
    | flex-shrink 1:2:3 & width 0 & margin 60
    br
    span.ok
      | 0 + 0 + 0 + (margin 360)
  +container('flex-shrink-container-width0-margin60')
  span.desc
    | flex-shrink 1:2:3 & width 0 & padding 70
    br
    span.ok
      | 140 + 140 + 140
  +container('flex-shrink-container-width0-padding70')
  span.desc
    | flex-shrink 1:2:3 & width 0 & margin 70
    br
    span.ok
      | 0 + 0 + 0 + (margin 420)
  +container('flex-shrink-container-width0-margin70')
  span.desc
    | flex-grow 1:2:3 & basis content
    br
    span.warn 40 + 40 + 40 [Chrome, Firefox, Safari, IE11]
    br
    | 360 - (40 + 40 + 40) = 240
    br
    | (40 + 1/6 * 240) + (40 + 2/6 * 240) + (40 + 3/6 * 240)
    br
    span.warn 80 + 120 + 160 [Edge]
  +container('flex-grow-container-basiscontent')
  span.desc
    | flex-grow 1:2:3 & basis content:content:auto
    br
    | 360 - (40 + 40 + 40) = 240
    br
    | (40 + 0 * 240) + (40 + 0 * 240) + (40 + 1 * 240) #[span.warn |] (40 + 1/6 * 240) + (40 + 2/6 * 240) + (40 + 3/6 * 240)
    br
    span.warn
      | 40 + 40 + 280 [Chrome, Firefox, Safari, IE11]
      br
      | 80 + 120 + 160 [Edge]
  +container('flex-grow-container-basiscontent_content_auto')
  span.desc
    | flex-grow 1:2:3 (longhand) & basis content
    br
    | 360 - (40 + 40 + 40) = 240
    br
    | (40 + 1/6 * 240) + (40 + 2/6 * 240) + (40 + 3/6 * 240)
    br
    span.ok 80 + 120 + 160
  +container('flex-growlonghand-container-basiscontent')
  span.desc
    | flex-shrink 1:2:3 & basis content & content 160
    br
    span.warn 160 + 160 + 160 [Chrome, Firefox, Safari, Edge]
    br
    | 360 - (160 + 160 + 160) = -120
    br
    | (160 - 1/3 * 120) + (160 - 1/3 * 120) + (160 - 1/3 * 120)
    br
    span.warn 120 + 120 + 120 [IE11]
  +container('flex-shrink-container-basiscontent-content160')
  span.desc
    | flex-shrink 1:2:3 & basis content & content 160 & min-width 0
    br
    span.warn 160 + 160 + 160 [IE11]
    br
    | 360 - (160 + 160 + 160) = -120
    br
    | (160 - 1/3 * 120) + (160 - 1/3 * 120) + (160 - 1/3 * 120) #[span.warn |] (160 - 1/6 * 120) + (160 - 2/6 * 120) + (160 - 3/6 * 120)
    br
    span.warn
      | 120 + 120 + 120 [Chrome, Firefox, Safari]
      br
      | 140 + 120 +100 [Edge]
  +container('flex-shrink-container-basiscontent-content160-minwidth0')
  span.desc
    | flex-shrink 1:2:3 & basis content:content:auto & content 160 & min-width 0
    br
    span.warn 160 + 160 + 160 [IE11]
    br
    | 360 - (160 + 160 + 160) = -120
    br
    | (160 - 1/5 * 120) + (160 - 1/5 * 120) + (160 - 3/5 * 120) #[span.warn |] (160 - 1/6 * 120) + (160 - 2/6 * 120) + (160 - 3/6 * 120)
    br
    span.warn
      | 136 + 136 + 88 [Chrome, Firefox, Safari]
      br
      | 140 + 120 +100 [Edge]
  +container('flex-shrink-container-basiscontent_content_auto-content160-minwidth0')
  span.desc
    | flex-shrink 1:2:3 (longhand) & basis content & content 160 & min-width 0
    br
    span.warn 160 + 160 + 160 [IE11]
    br
    | 360 - (160 + 160 + 160) = -120
    br
    | (160 - 1/6 * 120) + (160 - 2/6 * 120) + (160 - 3/6 * 120)
    br
    span.warn 140 + 120 + 100 [Chrome, Firefox, Safari, Edge]
  +container('flex-shrinklonghand-container-basiscontent-content160-minwidth0')


              
            
!

CSS

              
                html
  box-sizing border-box
  overflow auto

*
  position relative
  box-sizing inherit

body
  display flex
  align-items center
  justify-content center
  background-color #f8f8f8
  .wrapper
    flex 0 0 auto
    width 360px
    height auto
    display flex
    flex-flow column nowrap
    align-items center
    justify-content center
    padding 20px 0 0
    box-shadow 0 0 15px rgba(black, .16)
    .desc
      width 100%
      height auto
      color #222
      text-align center
      font-size 10px
      white-space nowrap
      background-color rgba(#FDF6E3,.8)
      .warn
        color #d33
        font-weight bold
      .ok
        color #2a3
        font-weight bold
    .measure
      position absolute
      top 0
      left 0
      display flex
      width 360px
      height 100%
      .unit
        width auto
        height 100%
        flex 0 0 10px
        &:nth-child(odd)
          background-color #d0ead0
        &:nth-child(even)
          background-color #f1fbe1
    .container
      width 360px
      height auto
      margin 10px 0 40px
      text-align center
      border-top 1px rgba(black, .3) solid
      border-bottom @border-top
      .item
        box-sizing content-box
        &.border-box
          box-sizing border-box
        &.foo
          background-color rgba(#2299ab,.7)
          .item-width
            background-color blend(rgba(#11779a, .7),#222)
        &.bar
          background-color rgba(#6ca233,.7)
          .item-width
            background-color blend(rgba(#239022, .7),#222)
        &.baz
          background-color rgba(#ffcc2c,.7)
          .item-width
            background-color blend(rgba(#ff9911, .7),#222)
        .item-width,
        .text
          font-size 10px
          display inline-block
        .item-width
          width auto
          height auto
          position absolute
          top 0
          left 0
          color #FDF6E3
          padding 0 5px
        .text
          width 40px
          height auto
          color #222
          background-color #FDF6E3
    .block-container
      display block
      .block-item
        float left
        padding 20px 0
        &.foo
          width 60px
          height auto
        &.bar
          width 120px
          height auto
        &.baz
          width 180px
          height auto
    .flex-grow-container-widthauto
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        &.foo
          flex 1 0 auto
        &.bar
          flex 2 0 auto
        &.baz
          flex 3 0 auto
    .flex-grow-container-widthauto-padding20
      display flex
      .flex-item
        width auto
        height auto
        padding 20px
        &.foo
          flex 1 0 auto
        &.bar
          flex 2 0 auto
        &.baz
          flex 3 0 auto
    .flex-grow-container-widthauto-margin20
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        margin 0 20px
        &.foo
          flex 1 0 auto
        &.bar
          flex 2 0 auto
        &.baz
          flex 3 0 auto
    .flex-grow-container-basis0
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        &.foo
          flex 1 0 0px
        &.bar
          flex 2 0 0px
        &.baz
          flex 3 0 0px
    .flex-grow-container-basis0-1_5_6
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        &.foo
          flex 1 0 0px
        &.bar
          flex 5 0 0px
        &.baz
          flex 6 0 0px
    .flex-grow-container-basis0-content80
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        .text
          width 80px
          height auto
        &.foo
          flex 1 0 0px
        &.bar
          flex 2 0 0px
        &.baz
          flex 3 0 0px
    .flex-grow-container-basis0-content120
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        .text
          width 120px
          height auto
        &.foo
          flex 1 0 0px
        &.bar
          flex 2 0 0px
        &.baz
          flex 3 0 0px
    .flex-grow-container-basis0-content160
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        .text
          width 160px
          height auto
        &.foo
          flex 1 0 0px
        &.bar
          flex 2 0 0px
        &.baz
          flex 3 0 0px
    .flex-grow-container-width0
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 0
        &.foo
          flex 1 0 auto
        &.bar
          flex 2 0 auto
        &.baz
          flex 3 0 auto
    .flex-grow-container-width-1_5_6
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 0
        &.foo
          flex 1 0 auto
        &.bar
          flex 5 0 auto
        &.baz
          flex 6 0 auto
    .flex-grow-container-width0-content80
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 0
        .text
          width 80px
          height auto
        &.foo
          flex 1 0 auto
        &.bar
          flex 2 0 auto
        &.baz
          flex 3 0 auto
    .flex-grow-container-width0-content120
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 0
        .text
          width 120px
          height auto
        &.foo
          flex 1 0 auto
        &.bar
          flex 2 0 auto
        &.baz
          flex 3 0 auto
    .flex-grow-container-width0-content160
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 0
        .text
          width 160px
          height auto
        &.foo
          flex 1 0 auto
        &.bar
          flex 2 0 auto
        &.baz
          flex 3 0 auto
    .flex-grow-container-width0-padding20
      display flex
      .flex-item
        width 0
        height auto
        padding 20px
        &.foo
          flex 1 0 auto
        &.bar
          flex 2 0 auto
        &.baz
          flex 3 0 auto
    .flex-grow-container-width0-margin20
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 0
        margin 0 20px
        &.foo
          flex 1 0 auto
        &.bar
          flex 2 0 auto
        &.baz
          flex 3 0 auto
    .block-container-120
      display block
      .block-item
        float left
        padding 20px 0
        &.foo
          width 120px
          height auto
        &.bar
          width 120px
          height auto
        &.baz
          width 120px
          height auto
    .flex-shrink-container-basis160
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis200
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        &.foo
          flex 0 1 200px
        &.bar
          flex 0 2 200px
        &.baz
          flex 0 3 200px
    .flex-shrink-container-basis360
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        &.foo
          flex 0 1 360px
        &.bar
          flex 0 2 360px
        &.baz
          flex 0 3 360px
    .flex-shrink-container-basis360-minwidth0
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        min-width 0
        &.foo
          flex 0 1 360px
        &.bar
          flex 0 2 360px
        &.baz
          flex 0 3 360px
    .flex-shrink-container-width160
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 0
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width200
      display flex
      .flex-item
        width 200px
        height auto
        padding 20px 0
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width360
      display flex
      .flex-item
        width 360px
        height auto
        padding 20px 0
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width360-minwidth0
      display flex
      .flex-item
        width 360px
        height auto
        padding 20px 0
        min-width 0
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-basis160-padding20
      display flex
      .flex-item
        width auto
        height auto
        padding 20px
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-margin20
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        margin 0 20px
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-padding40
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 40px
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-padding40-minwidth0
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 40px
        min-width 0
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-margin40
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        margin 0 40px
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-margin40-minwidth0
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        margin 0 40px
        min-width 0
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-padding50
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 50px
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-padding50-minwidth0
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 50px
        min-width 0
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-margin50
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        margin 0 50px
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-margin50-minwidth0
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        margin 0 50px
        min-width 0
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-padding70-borderbox
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 70px
        box-sizing content-box
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-padding70-borderbox-minwidth0
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 70px
        box-sizing content-box
        min-width 0
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-width160-padding20
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-margin20
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 0
        margin 0 20px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-padding40
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 40px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-padding40-minwidth0
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 40px
        min-width 0
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-margin40
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 0
        margin 0 40px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-margin40-minwidth0
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 0
        margin 0 40px
        min-width 0
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-padding50
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 50px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-padding50-minwidth0
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 50px
        min-width 0
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-margin50
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 0
        margin 0 50px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-margin50-minwidth0
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 0
        margin 0 50px
        min-width 0
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-padding70-borderbox
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 70px
        box-sizing content-box
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-padding70-borderbox-minwidth0
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 70px
        box-sizing content-box
        min-width 0
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-basis0
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        &.foo
          flex 0 1 0px
        &.bar
          flex 0 2 0px
        &.baz
          flex 0 3 0px
    .flex-shrink-container-width0
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 0
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-basis0-content160
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        .text
          width 160px
          height auto
        &.foo
          flex 0 1 0px
        &.bar
          flex 0 2 0px
        &.baz
          flex 0 3 0px
    .flex-shrink-container-width0-content160
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 0
        .text
          width 160px
          height auto
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-basis160-content160
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        .text
          width 160px
          height auto
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-basis160-content160-minwidth0
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        min-width 0
        .text
          width 160px
          height auto
        &.foo
          flex 0 1 160px
        &.bar
          flex 0 2 160px
        &.baz
          flex 0 3 160px
    .flex-shrink-container-width160-content160
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 0
        .text
          width 160px
          height auto
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width160-content160-minwidth0
      display flex
      .flex-item
        width 160px
        height auto
        padding 20px 0
        min-width 0
        .text
          width 160px
          height auto
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width0-padding40
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 40px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width0-margin40
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 0
        margin 0 40px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width0-padding60
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 60px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width0-margin60
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 0
        margin 0 60px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width0-padding70
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 70px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-shrink-container-width0-margin70
      display flex
      .flex-item
        width 0
        height auto
        padding 20px 0
        margin 0 70px
        &.foo
          flex 0 1 auto
        &.bar
          flex 0 2 auto
        &.baz
          flex 0 3 auto
    .flex-grow-container-basiscontent
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        &.foo
          flex 1 0 content
        &.bar
          flex 2 0 content
        &.baz
          flex 3 0 content
    .flex-grow-container-basiscontent_content_auto
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        &.foo
          flex 1 0 content
        &.bar
          flex 2 0 content
        &.baz
          flex 3 0 auto
    .flex-growlonghand-container-basiscontent
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        &.foo
          flex-grow 1
          flex 1 0 content
        &.bar
          flex-grow 2
          flex 2 0 content
        &.baz
          flex-grow 3
          flex 3 0 content
    .flex-shrink-container-basiscontent-content160
      display flex
      .flex-item
        width auto
        height auto
        padding 20px 0
        &.foo
          flex 0 1 content
          .text
            width 160px
            height auto
        &.bar
          flex 0 2 content
          .text
            width 160px
            height auto
        &.baz
          flex 0 3 content
          .text
            width 160px
            height auto
    .flex-shrink-container-basiscontent-content160-minwidth0
      display flex
      .flex-item
        width auto
        height auto
        min-width 0
        padding 20px 0
        &.foo
          flex 0 1 content
          .text
            width 160px
            height auto
        &.bar
          flex 0 2 content
          .text
            width 160px
            height auto
        &.baz
          flex 0 3 content
          .text
            width 160px
            height auto
    .flex-shrink-container-basiscontent_content_auto-content160-minwidth0
      display flex
      .flex-item
        width auto
        height auto
        min-width 0
        padding 20px 0
        &.foo
          flex 0 1 content
          .text
            width 160px
            height auto
        &.bar
          flex 0 2 content
          .text
            width 160px
            height auto
        &.baz
          flex 0 3 auto
          .text
            width 160px
            height auto
    .flex-shrinklonghand-container-basiscontent-content160-minwidth0
      display flex
      .flex-item
        width auto
        height auto
        min-width 0
        padding 20px 0
        &.foo
          flex-shrink 1
          flex 0 1 content
          .text
            width 160px
            height auto
        &.bar
          flex-shrink 2
          flex 0 2 content
          .text
            width 160px
            height auto
        &.baz
          flex-shrink 3
          flex 0 3 content
          .text
            width 160px
            height auto

              
            
!

JS

              
                [].slice.call(document.querySelectorAll('.item'), 0)
  .map(item => [item.querySelector('.item-width'), item])
  .forEach(([l, w]) => detectWidth(l, w));

[].forEach.call(document.querySelectorAll('.text'), text => detectWidth(text, text));

function detectWidth(labelEle, widthEle) {
  labelEle.textContent = widthEle.getBoundingClientRect().width;
}
              
            
!
999px

Console