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

Sections and articles have no padding or margin? #35

Closed
EternityForest opened this issue Nov 2, 2023 · 2 comments
Closed

Sections and articles have no padding or margin? #35

EternityForest opened this issue Nov 2, 2023 · 2 comments

Comments

@EternityForest
Copy link

I am working on an experimental port of a webapp, and I'm finding that out of the box, sections and articles are cramped. As semantic elements, should these have a bit more styling OOB?

@dz4k
Copy link
Collaborator

dz4k commented Jan 26, 2024

Sections and articles usually start with headings, which have top margins. Some HTML generating tools (e.g. Asciidoc, Pandoc in some configurations) automatically insert section tags based on headings. This means adding margin to sections by default would lead to those documents being unevenly spaced.

Section and article are elements with extremely broad usage, and no behavior that would guide their appearance. My experimentation in the early stages of missing.css development showed any styling we add would break some valid document.

If you want, you can use the margin-block class to add margin in the block axis (the vertical axis, in languages written horizontally).

@dz4k
Copy link
Collaborator

dz4k commented Jan 26, 2024

Closing this issue since I don't currently plan to implement this, but I am still open to discussion if you (or anyone else) have ideas on how we could style sections and articles without breaking valid documents. Our discord channel (https://htmx.org/discord #missing-css) is currently the most convenient medium for discussion.

@dz4k dz4k closed this as completed Jan 26, 2024
@dz4k dz4k reopened this Jan 26, 2024
@dz4k dz4k closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2024
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

No branches or pull requests

2 participants