.ruler {
  position: absolute;
  background-color: #f0f0f0;
  font-family: sans-serif;
  z-index: 10;
}

.horizontal {
  top: 0;
  left: 30px;
  height: 30px;
  right: 0;
  border-bottom: 1px solid #333;
}

.vertical {
  top: 30px;
  left: 0;
  width: 30px;
  bottom: 0;
  border-right: 1px solid #333;
}

.tick {
  position: absolute;
  background-color: #000;
  opacity: 0.6;
}

.horizontal .tick {
  width: 1px;
  height: 10px;
  top: 0;
}

.vertical .tick {
  width: 10px;
  height: 1px;
  left: 0;
}

.label {
  position: absolute;
  font-size: 9px;
  color: #333;
  white-space: nowrap;
}

.horizontal .label {
  top: 12px;
  transform: translateX(-50%);
}

.vertical .label {
  left: 12px;
  transform: translateY(-50%) rotate(-90deg);
}

#newCanvas {
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 1;
}
