Skip to content

LaTeX-style definition lists #3272

Answered by Martinomagnifico
krivit asked this question in Q&A
Discussion options

You must be logged in to vote
.reveal dl {
  --fontsize: calc( 1 * var(--r-main-font-size));
  --dlindent: calc( 2 * var(--fontsize));
  --dldistance: calc( .5 * var(--fontsize));
  padding-left: var(--dlindent);
  font-size: 0;
}
.reveal dt {
  display: inline-block;
  font-size: var(--fontsize);
  margin-left: calc(-1 * var(--dlindent));
  padding-right: var(--dldistance);
  min-width: calc(var(--dlindent) - var(--dldistance));
}
.reveal dd {
  display: inline;
  font-size: var(--fontsize);
  margin-left: 0;
}
.reveal dd + dt {
  margin-top: var(--dldistance);
}
.reveal dd:after {
  display: block;
  content: "";
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@krivit
Comment options

@krivit
Comment options

Answer selected by krivit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants