oss-specs/specs

View on GitHub
public/css/projects.css

Summary

Maintainability
Test Coverage
.projects h2 {
  font-size: 1.8em;
}

.projects form {
  display: inline-block;
}

.projects form {
  margin-bottom: 1em;
}

.projects input {
  margin-top: 1em;
  margin-right: 0.5em;
  margin-bottom: 1em;
}

.projects button {
  font-size: 1.1em;
}

.projects-list a {
  text-decoration: none;
}

.delete-project,
.project-link-container {
  display: inline-block;
}

button.delete-project {
  float: left;
  font-size: 1.2em;
  line-height: 1.7em;
  padding-bottom: 0.3em;
  margin: 0 0.5em 0 0;
  background-color: rgba(255, 100, 0, 0.7);
  color: white;
}

button.delete-project:hover {
  background-color: rgba(255, 100, 0, 0.7);
  color: red;
}


button.delete-project:active {
  background-color: rgba(255, 100, 0, 0.5);
  color: darkred;
}

button.delete-project.waiting {
  animation: sweep 1s infinite linear;
}
@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

/* TODO: standardise and reuse styling via pre-processor */
.project-link {
  cursor: interactive;
  text-align: center;
  max-width: 100%;
  margin-bottom: 0.8em;
  background-color: #FAFAFA;
  border: 1px solid rgb(220, 220, 220);
  border-radius: 0.3em;
  box-shadow: 0.05em 0.1em 0.2em 0.01em rgb(220, 220, 220);
  color: blue;
}
.project-link:hover {
  background-color: #FFF;
  box-shadow: 0 0 1em lightgreen;
}

.project-link p {
  margin: 0;
  padding: 0.5em;
}

footer .app-version {
  position: fixed;
  bottom: 0;
  right: 0;
  padding-bottom: 1em;
  padding-right: 1.3em;
  color: rgba(100, 100, 100, 0.5);
}


.project-controls > section {
  text-align: center;
  padding: 0.5em 1em;
  margin-top: 3rem; /* rem so that the sections line up at the top */
  margin-bottom: 3em;
}

/**
 * Wideview port (e.g. landscape tablet).
 */
@media (min-width: 800px) {
  .project-controls > section {
    float: left;
    text-align: inherit;
  }

  .projects-list-container {
    font-size: 1em;
  }

  .add-project-container {
    font-size: 1em;
    max-width: 20em;
    margin-left: 3.5em;
  }
}

/**
 * Wider viewport (e.g. monitor, tv).
 */
@media (min-width: 1280px) {
  .projects-list-container {
    font-size: 1.1em;
  }

  .add-project-container {
    font-size: 0.9em;
    max-width: none;
    margin-left: 5em;
  }

  .projects input {
    margin-top: 0;
  }
}