uccser/cs-field-guide

View on GitHub
csfieldguide/static/interactives/high-score-boxes/css/high-score-boxes.scss

Summary

Maintainability
Test Coverage
/* Container for all boxes */
#interactive-high-score-boxes div#boxes-container {
  overflow: auto;
  padding: 1rem 0;
}
#interactive-high-score-boxes div#boxes-container:after {
  clear: both;
}
/* Container an individual box */
#interactive-high-score-boxes div.boxContainer {
    float: left;
  position: relative;
  margin: 0.5rem;
  padding: 0 4rem;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
/* Box image */
#interactive-high-score-boxes img.box {
    width: 6rem;
    height: 6rem;
    position: absolute;
    background-color: white;
    z-index: 3;
    cursor: pointer;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
/* Box number (behind image) */
#interactive-high-score-boxes div.box_number {
    width: 6rem;
    height: 6rem;
    text-align: center;
    vertical-align: middle;
    line-height: 6rem;
    display: block;
    position: relative;
    z-index: 2;
    font-size: 1.5rem;
    font-weight: bold;
}
/* Clicked boxes */
#interactive-high-score-boxes img.box.clicked {
  -webkit-filter: grayscale(100%); /* Chrome, Safari, Opera */
  filter: grayscale(100%);
}
/* Restart button */
#interactive-high-score-boxes #restart-button {
    display: none;
}