Sha256: aae0ef6c6671a156b72578ba56b2ecb579003466c984aa1e04d567b20622e76c

Contents?: true

Size: 1.66 KB

Versions: 3

Compression:

Stored size: 1.66 KB

Contents

//table component

.rwd-table {
  margin: 1em 0;
  min-width: 300px; // adjust to your needs
  font-size: 16px;
  width: 100%;
  padding: 10px;
    
  tr {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
  }
  
  th {
    display: none; // for accessibility, use a visually hidden method here instead! Thanks, reddit!   
  }
  
  td {
    display: block; 
    
    &:first-child {
      padding-top: .5em;
    }
    &:last-child {
      padding-bottom: .5em;
    }

    &:before {
      content: attr(data-th)": ";
      font-weight: bold;

      // optional stuff to make it look nicer
      width: 6.5em; // magic number :( adjust according to your own content
      display: inline-block;
      // end options
      
      @media (min-width: $breakpoint-alpha) {
        display: none;
      }
    }
  }
  
  th, td {
    text-align: left;
    
    @media (min-width: $breakpoint-alpha) {
      display: table-cell;
      padding: .25em .5em;
      
      &:first-child {
        padding-left: 0;
      }
      
      &:last-child {
        padding-right: 0;
      }
    }
  }
}

.rwd-table {
  background: rgba(233, 233, 233, 0.77);;
  table-layout: auto;
  color: #295158;
  overflow: hidden;
  tr > td:first-child {
    cursor: pointer;
  }
  tr.item.selected{
    background-color: $medium_blue;
    color: white;
  }  
  th, td {
    margin: .5em 1em;
    @media (min-width: $breakpoint-alpha) { 
      padding: 10px!important;
    }
  }
  thead tr:first-child{
    background: #2399C7;
    @include font-attr(18px, whitesmoke, bolder);
  }

  thead tr{
    th{
      min-width: 100px;
      vertical-align: center;
    }
    th:first-child{
      min-width: 40px;
    }
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
waterfall_bourbon_neat_rails-1.0.2 app/assets/stylesheets/custom/components/_table.scss
waterfall_bourbon_neat_rails-1.0.1 app/assets/stylesheets/custom/components/_table.scss
waterfall_bourbon_neat_rails-1.0 app/assets/stylesheets/custom/components/_table.scss