crispgm/holy-images

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

Summary

Maintainability
Test Coverage
// scss-lint:disable Comment
/*
 *= require_self
 *= require_tree .
 */

// Theme of Crisp Wiki
// Copyright(c) David Zhang, 2018

@import 'font-awesome-sprockets';
@import 'font-awesome';

$dark-grey:    #343a40;
$dark-shadow:  #868e96;
$light-grey:   #adb5bd;
$light-shadow: #ced4da;
$almost-white: #f8f9fa;

$info-bg:      #adb5bd;
$table-yellow: #facb5b;
$warning-red:  #e95260;

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  width: 100%;
}

@media (max-width: 36rem) {
  html {
    font-size: 12px;
  }
}

body {
  background-color: $almost-white;
  color: $dark-grey;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  height: 100%;
  margin: 0;
  text-align: center;
  word-wrap: break-word;

  &::selection {
    background-color: $dark-grey;
    color: $almost-white;
  }
}

footer {
  font-size: 1rem;
  margin-bottom: 1.2rem;
  margin-top: 2rem;
  overflow: hidden;
  text-align: center;
}

p {
  margin: .8rem 0 0;
}

table {
  border-spacing: 0;
  width: 100%;
}

th {
  background-color: $table-yellow;
  padding: .2rem .4rem;
}

tr:hover {
  background-color: $table-yellow;
}

a {
  color: inherit;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

.menu {
  background-color: $dark-grey;
  box-shadow: 0 1px 2px 0 $dark-shadow;
  color: $almost-white;
  font-size: 1.4rem;
  line-height: 1;
  padding: 1.5rem 0;
  text-align: center;

  a {
    color: inherit;
    text-decoration: none;

    &:hover {
      text-decoration: none;
    }
  }
}

.menu-wrapper {
  margin: 0 auto;
  max-width: 36rem;
  text-align: left;
}

@media (max-width: 36rem) {
  .menu-wrapper {
    padding: 0 .8rem;
    width: 100%;
  }
}

.site-name {
  margin-right: .4rem;
  padding-right: .4rem;
}

.site-menu {
  color: inherit;
  float: right;
  font-size: 1.2rem;

  a:hover {
    text-decoration: underline;
  }
}

.container {
  margin: 2rem auto 3rem;
  max-width: 36rem;
  text-align: left;
}

@media (max-width: 36rem) {
  .container {
    margin-bottom: .4rem;
    margin-top: .4rem;
    padding-left: .4rem;
    padding-right: .4rem;
    width: 100%;
  }
}

.section {
  margin-top: 1rem;
  text-align: left;
}

.section-image {
  margin-top: 2rem;
}

.section-wrap {
  background-color: $almost-white;
  box-shadow: 0 1px 2px 0 $light-shadow;
  margin-top: 1rem;
  padding: 1rem;
}

@media (max-width: 36rem) {
  .section {
    margin-top: .4rem;
  }

  .section-wrap {
    margin-top: .4rem;
  }
}

.section-item {
  display: block;
  line-height: 1.25;
  overflow: auto;
}

.section-title {
  font-size: 1.1rem;
  width: 100%;
}

.section-content {
  padding-top: .8rem;
  width: 100%;
}

.section-action {
  float: right;
  font-size: .8rem;
  height: 1rem;
  line-height: 1rem;
  padding-top: 1.3rem;
  text-align: right;

  .fa {
    font-size: 1rem;
    margin-left: .6rem;
    margin-right: .2rem;
  }
}

.section-footer {
  display: flex;
  line-height: 1.25;
  padding-top: .8rem;
}

.section-footer-icon {
  width: auto;
}

.section-footer-name {
  padding-left: .8rem;
  width: 40%;
}

.section-time {
  color: $light-grey;
  float: right;
  text-align: right;

  a {
    color: $light-grey;
  }
}

.blank {
  background-color: $almost-white;
}

.info {
  background-color: $info-bg;

  a {
    color: $dark-grey;
  }
}

.hint {
  background-color: $table-yellow;
}

.warning {
  background-color: $warning-red;
}

.hover-effect:hover {
  box-shadow: 0 1px 2px 1px $light-shadow;
}

.left {
  text-align: left;
}

.right {
  text-align: right;
}

.mid {
  text-align: center;
}

img {
  max-width: 100%;
}

.text-center {
  text-align: center;
}