OperationCode/front-end

View on GitHub
components/Timeline/Timeline.module.css

Summary

Maintainability
Test Coverage
.timeline {
  width: 90%;
  margin: 50px auto;
}

.segment {
  display: flex;
}

/* Date (left column) */
.date {
  flex: 1;
  position: relative;
  text-align: right;
}

.date > h3 {
  position: absolute;
  width: 100%;
  top: 14px;
  padding-right: 10px;
}

/* Vertical Line w/ Bubbles (middle column) */
.vertLine {
  position: relative;
  padding: 0 20px;
}

.line {
  position: absolute;
  transform: translateX(-50%);
  width: 2px;
  top: 0;
  height: 100%;
  background-color: #d7d7d7;
}

.bubble {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #7d7d7d;
  background-color: white;
  position: absolute;
  transform: translateX(-50%);
  top: 25px;
}

/* Events (right column) */
.timelineEvent {
  flex: 8;
}

@media screen and (--medium-viewport) {
  .date > h3 {
    top: 24px;
    font-size: 1.1rem;
  }
}