Skip to content

Comment on Show HN: Flexbox.io – a free video series on learning CSS Flexbox

Comments

Are there any examples around of combining Bootstrap and Flexbox; i.e. relying on Flexbox for layout and NOT using Bootstrap's grid, but using Bootstrap's other components... is that practical without a significant rewrite of Bootstrap (i.e. do the component styles make lots of assumptions about being sited within the Bootstrap grid).

I added flexbox in certain areas of a bootstrap site to cleanly show varying size thumbnails in a grid. (Probably uglier than necessary.)

  .row-flex {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-flow: row wrap;
    -moz-flex-flow: row wrap;
    -ms-flex-wrap: wrap;
    flex-flow: row wrap;
    align-content: flex-start;
    -ms-flex: 0;
    flex: 0;
  }

  <div class="row row-flex">
    <div class="col-md-2"></div>
    ...
  </div>
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.