openaustralia/publicwhip

View on GitHub
app/assets/stylesheets/divisions/_division-comparison-table.scss

Summary

Maintainability
Test Coverage
.divisions-table {
  thead {
    @media (max-width: $screen-xs-max) {
      // Only display content to screen readers
      //
      // See: http://a11yproject.com/posts/how-to-hide-content/

      position: absolute;
      clip: rect(0,0,0,0);
      border: 0;
    }
  }

  tr,
  td {
    @media (max-width: $screen-xs-max) {
      display: block;
      border: 0 !important;
      padding: 0 !important;
    }
  }

  tr {
    @media (max-width: $screen-xs-max) {
      margin-bottom: 3em;
    }
  }

  .division-policy-vote {
    &:before {
      @media (max-width: $screen-xs-max) {
        content: "Supporter would have voted "
      }
    }
  }

  .division-member-vote {
    &:before {
      @media (max-width: $screen-xs-max) {
        content: attr(data-member) " voted ";
      }
    }
  }

  .division-outcome {
    &:before {
      @media (max-width: $screen-xs-max) {
        content: "Division outcome: "
      }
    }
  }
}