Hacker News new | past | comments | ask | show | jobs | submit login

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>




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: