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.

Optional frames, borders or shadow around images

+4
−0

Sometimes, images found in posts blend with the background. That can certainly look better than an image that stands out from the surrounding page, but every now and then, standing out is just what is needed. This can often be the case with screenshots of Codidact itself, where it's confusing when looking at a post with such a screenshot in it, and it blends with the rest. Having a frame, border or shadow around these images, can provide necessary clarity, and helps set content apart, giving a better overview. My latest post turned out to be rather unpleasant to look at with two screenshots of another Codidact question, so I followed a suggestion to put them in citations, to get a border around them. That's better, but it doesn't look pretty. It's not what citations exist for, so having another way to specify either a border or a shadow behind the image, would be nice. We don't necessarily need two options for either a border or shadow; we can decide on one of them.

I'm not sure what the best way to support this is, so I'm leaving suggestions for that up to answers.

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

1 comment thread

Element attributes (1 comment)

3 answers

+3
−1

I prefer no border for general images

I would not want every image to be surrounded by a border. Images are added for many reasons, and in many cases a border would not be wanted. For example, a border around a photograph or a diagram could be distracting and would reduce the available width.

I'm happy with quote blocks for screenshots

Whenever I need to include a screenshot of Codidact that may be confused with the interface of the site itself, I put the screenshot in a quote block. To me, this does not seem like a substitute or a compromise. I think of a screenshot as a visual quote, so a quote block seems fitting.

I like the compatibility of Markdown

Codidact posts are by default licensed freely, allowing them to be reused anywhere. I like the fact that we use CommonMark Markdown, so that reused content can be rendered without being dependent on Codidact's specific styling. For this reason I am wary of adding non-standard extra features to Markdown.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

These are good points. Maybe we should add the quote-block suggestion to the formatting help. (2 comments)
+1
−0

Images should not be forced to have borders. If you are posting a diagram, for example, then it is already visually different from the rest of the post and the border may be confused as part of the diagram or add visual clutter. A border is usually unnecessary and would detract from photographs.

On the other hand, there are cases where visually setting off the image from the post is useful, as you show in your questions. I'm no HTML expert so I don't know how possible this is. A tag that works like <blockquote> but with a simpler and thinner border would solve the problem. It might be called <box> or something (again, no HTML expert here).

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

+0
−1

Edit: withdrawn. There are issues with this approach, including the possibility of introducing technical inaccuracies (see comments).

Original post (kept to preserve the discussion and let future answers know it's already been considered):

I'd rather build something in than make users figure out whether each image needs special handling. What about if images in posts always get a small border? (I'm not proposing to change the behavior of any other images, like user avatars.) I don't know how the Markdown-to-rendered-HTML path works, but if we could add a border element to that img tag on its way out from Markdown, that seems like it would present a good user experience.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

4 comment threads

Borders around schematics could seriously confuse (4 comments)
Example CSS (1 comment)
Images in posts, only (1 comment)
Excessive and intrusive (1 comment)

Sign up to answer this question »