Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glossary css #407

Merged
merged 3 commits into from
Feb 16, 2024
Merged

glossary css #407

merged 3 commits into from
Feb 16, 2024

Conversation

mruwnik
Copy link
Collaborator

@mruwnik mruwnik commented Feb 15, 2024

This generally works, but might need a bit of css tweaking:
image

The main thing is what to do about the image size. This version just assumes it's up to the editors to get a version that looks good

: '') +
' </div>' +
(entry.image ? `<img src="${entry.image}" alt="${entry.term}"/>` : '') +
'</div>'
Copy link
Collaborator

@Aprillion Aprillion Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(minor) ah, have you considered 1 multiline string template, please? or maybe https://react.dev/reference/react-dom/server/renderToString if we need so much logic here 😅

@@ -77,6 +76,15 @@ article .link-popup::after {
right: 100%;
}

article .link-popup .glossary-popup > .contents {
padding: var(--spacing-24) var(--spacing-40) var(--spacing-24);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 or 4 values would make more sense here IMHO, but if the bottom is same as top, repeating it looks suspicious

? `<a href="/${entry.pageid}" class="button secondary">View full definition</a>`
: '') +
' </div>' +
(entry.image ? `<img src="${entry.image}" alt="${entry.term}"/>` : '') +
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alt="" for decorative images, please!! we shouldn't make users of screen reader listen to the same header twice 😅

@mruwnik mruwnik merged commit 325f5b6 into stampy-redesign Feb 16, 2024
1 check passed
@mruwnik mruwnik deleted the glossary branch February 16, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants