Template:Todo/styles.css

From Final Fantasy XIV Online Wiki
Jump to navigation Jump to search
.todo-box {
  position: relative;
  display: inline grid;
  box-sizing: border-box;

  width: 1em;
  height: 1em;
  margin-bottom: -0.1em; /* text alignment garbage */
  
  background-color: var(--background-color-neutral-subtle, #f8f9fa);
  border: 2px solid currentcolor;
  border-radius: 2px;

  place-items: center;
}
/* make whole box clickable to edit the page and update status */
.todo-box a {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  font-size: 0;
}

/* align with bullets when used in unordered lists */
ul > li .todo-box {
  position: absolute;
  margin-left: -1.3em;
  margin-top: 0.3em; /* hacky good-enough alignment */
}  

.todo-box[data-state="done"]::after {
  content: "";
  display: block;
  position: absolute;
  width: 0.5em;
  height: 0.2em;
  border-bottom: 2px solid currentcolor;
  border-left: 2px solid currentcolor;
  transform-origin: center;
  transform: translateY(-0.05em) rotate(-45deg);
}

.todo-box[data-state="pending"]::after {
  content: "";
  display: block;
  position: absolute;
  width: 0.5em;
  border-bottom: 2px solid currentcolor;
}

.todo-box[data-state="cancelled"]::before,
.todo-box[data-state="cancelled"]::after {
  content: "";
  display: block;
  position: absolute;
  width: 0.7em;
  border-bottom: 2px solid currentcolor;
  transform-origin: center;
  transform: rotate(45deg);
}
.todo-box[data-state="cancelled"]::after {
  transform: rotate(-45deg);
}