Skip to content

Commit

Permalink
Merge pull request #20 from dontcallmedom/css-flex
Browse files Browse the repository at this point in the history
Improve display of multiline type for terms
  • Loading branch information
dontcallmedom authored Feb 13, 2024
2 parents 085ffa1 + 195cac4 commit cdc1acd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _tools/generate-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ function composeDisplayName(displayTerm, type, _for, prefix, dfns, termId) {
}
const typeDesc = html` (<em>${typeInfo[amendedType]?.human ?? amendedType}${typeDescComp}</em>)`;
try {
return html`<code class=prefix>${displayPrefix}</code><strong>${wrapWithCode(html`${wrap}${displayTerm}${wrap}`, isCode(displayTerm, type), typeInfo[type].area)}</strong>${suffix}${typeDesc} <a class='self-link' href='#${encodeURIComponent(displayTerm + '@@' + termId)}' aria-label="Permalink for ${displayPrefix}${displayTerm}${suffix}">§</a>`;
return html`<code class=prefix>${displayPrefix}</code><span><strong>${wrapWithCode(html`${wrap}${displayTerm}${wrap}`, isCode(displayTerm, type), typeInfo[type].area)}</strong>${suffix}${typeDesc} <a class='self-link' href='#${encodeURIComponent(displayTerm + '@@' + termId)}' aria-label="Permalink for ${displayPrefix}${displayTerm}${suffix}">§</a></span>`;
} catch (e) {
console.error(type);
throw e;
Expand Down
5 changes: 3 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ blockquote {
margin-top: 3rem;
}

.prefix { text-align: right; display: inline-block; width: 12em; font-size:0.7em; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom;}
.prefix { text-align: right; display: inline-block; min-width: 12em; max-width: 12em; font-size:0.7em; overflow: hidden; text-overflow: ellipsis;}


dd {
Expand All @@ -273,7 +273,8 @@ dd {
}

dt {

display: flex;
align-items: baseline;
margin-top: 1rem;
}

Expand Down

0 comments on commit cdc1acd

Please sign in to comment.