<details>

anything within <details> will have box-sizing: content-box, not border-boxโ—๏ธ ๐Ÿ“— <details> & Shadow DOM & Inheritance

/* โญ๏ธ universal box-sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 1em;
}

.fixed-width {
  width: 400px;
  padding: 1em;
}

summary {
  background-color: tomato;
}

p {
  background-color: lawngreen;
  margin: 0;
}

.reference {
  margin-top: 1em;
  background-color: deepskyblue;
}

Last updated