Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Comments on Main and subheadings are almost the same size, but not in the edit preview

Parent

Main and subheadings are almost the same size, but not in the edit preview

+3
−0

When editing a post, headings with a single hash # show as significantly bigger than headings with a double hash ##. However, after saving, these two headings are much closer in size (to the point that my initial draft of this post mistakenly claimed that they are the same size).

For example:

# Heading 1
## Heading 2
### Heading 3
#### Heading 4

renders as:

Heading 1

Heading 2

Heading 3

Heading 4

Notice that Heading 1 and Heading 2 are quite similar in size here while you are reading this, but if you edit this post and look at the preview while editing, Heading 1 will be significantly bigger.

What should the correct behaviour be?

Personally I prefer the sizes that show in the preview while editing. I can easily tell the difference between Heading 1 and Heading 2 even if they are not adjacent in the post. I find the sizes in the saved post to be difficult to distinguish even when adjacent (especially in real cases that, unlike this example, don't both start with the same word).

Whatever the decision, what I see as important is that the preview should have the same behaviour as the rendered question, to avoid frustration for the question author, or being overlooked leading to a question that does not look as expected when written.

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

[GitHub issue[(https://github.com/codidact/co-design/issues/79) - co-design, so then would need to be... (4 comments)
Post
+0
−0

[status-norepro]

If you use your browser's Inspect Element feature, you should be able to find the computed font sizes on each. On all browsers on my end I see h1 as 27.2px and h2 as 25px. Admittedly that's not much difference!

History
Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

I realised my mistake after saving the question... (5 comments)
I realised my mistake after saving the question...
trichoplax‭ wrote over 1 year ago

Thanks for pointing this out. I've actually just edited my post before seeing your answer, as I realised after posting that there is a difference (it's easier to see in the example as both headings start with "Heading" so the fact that the words are not the same length stands out).

Having edited to fix my misunderstanding, I still prefer the more pronounced difference in sizes that shows in the edit preview, but my main hope is that the preview and final post can use the same sizes.

Monica Cellio‭ wrote over 1 year ago

I was writing an answer based on the original question and this answer while you were editing. ArtOfCode‭, please see the suggestions in my answer. I, too, could barely tell there was a difference, and only because the word "heading" is in all of them. The difference between 2 and 3 is huge, though, so there's room to bump 2 down a bit without crowding 3.

trichoplax‭ wrote over 1 year ago

I'd be equally happy with enlarging 1 or diminishing 2. At the moment, I've used 1 and 3 in one of my other posts in order to avoid 2 altogether, which is subverting the semantic intention and makes me feel bad about accessibility.

Monica Cellio‭ wrote over 1 year ago

Maybe consider using 2 and 3, skipping 1 entirely? If the usual semantics are that a page had one h1 (which is the title of the question), then using 2 and 3 in the body of a post doesn't seem wrong to me. A little odd to start with ##, but what the reader (or screen-reader) will see should still make sense, right? (Just thinking out loud about workarounds.)

trichoplax‭ wrote over 1 year ago

I like that. I've just updated my other post and it still reads fine, and now I feel better about screen readers too - thank you.