-
-
Save Josh68/69f9dc059fc1b227d2542e98be4234da to your computer and use it in GitHub Desktop.
Flexible multiline definition list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Flexible multiline definition list | |
*/ | |
dl { width: 200px; display: grid; grid-template-columns: 1fr 80%; gap: .5em .25em; } | |
dt { counter-increment: css-counter 1; font-weight: bold; white-space: nowrap; } | |
dt::before { content: counter(css-counter)". "; font-weight: normal; } | |
dt::after { content: ":"; } | |
dd { margin: 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dl> | |
<dt>foo</dt> | |
<dd>Definition of foo, which goes on for a little bit</dd> | |
<dt>bar</dt> | |
<dd>Definition of bar</dd> | |
</dl> | |
<!-- Evidently it's even correct to wrap terms in `dfn` tags (within the `dt` tags) if this is a true definition list --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment