Ch4s3/ink_stream

View on GitHub
app/assets/stylesheets/main.scss

Summary

Maintainability
Test Coverage
$primary-color: #00080C;
$secondary-color: #4EB9FF;
$yellow: #FFCE47;
$magenta: #FF4181;
$white: #fff;
body {
  background-color: $white
}

::selection {
  color: $primary-color;
  background: $magenta; /* WebKit/Blink Browsers */
}
::-moz-selection {
  color: $primary-color;  
  background: $magenta; /* Gecko Browsers */
}

main {
  padding: 0 0 2rem 0;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  transition: background 0.3s ease;
  background-color: rgba(0,0,0,0.5); /*dim the background*/
}

.turbolinks-progress-bar {
  height: 1rem;
  background-color: $magenta;
}

.content {
  margin: 4rem 0 0 0;
}

.search-background {
  z-index: -1;
  grid-row-start: m-start;
  grid-column-start: 1;
  grid-column-end: 5;
  height: 45rem;
  background: linear-gradient(to right, $secondary-color, #4EB9FF, #429cd6, #426bd6);
  transform: translateY(-10rem) skewY(2deg);
  transform-origin: top right;
}

.new_articles_search_form {
  margin-top: 3rem;
}
aside {
  grid-area: a;
}
.article {
  max-width: 70vw;
}
.articles, .publications {
  z-index: 1;
  grid-area: m;
}
.articles-list {
  li {
    font-size: 1.5em;
  }
}
.articles-list-link {
  margin-left: 1em;
}

footer.bottom-links {
  font-weight: 400;
  min-height: 2rem;
  padding: 1.5rem 0 1.5rem 0;
  grid-area: b;
}
.flash {
  grid-area: t;
  padding-top: 1rem;
  display: inline-block;
  line-height: 1.5rem;
  text-align: center;
  button {
    font-size: 2rem;
    color: $white;
  }
}
.flash {
  color: $white;
}
.flash.success, .notice {
  background-color: $secondary-color;
}
.flash.alert {
  background-color: $yellow;
}

.flash.error {
  background-color: $magenta;
}

button.button.dismiss-flash:hover {
  color: $white;
}

@media only screen 
and (min-device-width: 320px) 
and (max-device-width: 667px) 
and (-webkit-min-device-pixel-ratio: 2){
  .search-background {
    height: 50rem;
  }
  fieldset label, legend {
    font-size: 2rem;
  }
  div.wrapper input[type='text'], select {
    border: 0.2rem solid $white;
    height: 4.2rem !important;
    padding: .6rem 1.0rem;
  }
  .button.button-outline, button, input[type='submit'] {
    margin-top: 1rem;
    font-size: 1.8rem;
    height: 6.6rem;
  }
}