• he/him

fat queer fox, enjoyer of music, hoarder of shiny discs, sonic and racing game speedrunner, hater of cars and streaming services



thecommabandit
@thecommabandit

One of the things people have said they would like on Cohost is a way to do that old Twitter joke where you type up to the word limit so the tweet ends in a cut-off word. People have brought up a few ways to do this on Cohost, the easiest one being posting just a headline, which has a 140 character limit, but I haven't seen anyone suggest what I think is a much more interesting option, which is to use CSS to produce a negative margin so the frame of the post itself cuts off the text. This has several advantages, the main one being that it looks like the website itself is cutting you off. The main disadvantage is that screen readers aren't affected and won't communicate the visual joke very well. If you're using a screen reader, this part of the post has long since gone out of the frame, so sighted people can't see it. It can be just a little secret between me and you.


biggun
@biggun
This page's posts are visible only to users who are logged in.

You must log in to comment.

in reply to @thecommabandit's post:

If anyone wants to use this, I did it like this:

<p style="margin-bottom:-3.5em;">Text goes here, though you might have to adjust the margin size to get it right</p>

It also looks way better if you don't use tags

EDIT: @eladnarra has pointed out that screen readers keep reading the text after the cut-off. For accessibility, I would suggest that the text after the cut-off includes a brief explanation of the gag, plus a secret joke just for people who use screen readers.

And if you want to be able to use markdown inside it for your italics or whatever, I think you can do:

<div style="margin-bottom:-3.5em;">
and then a blank line, and then all of your post, then another blank line, before
</div>

i love how webkit line clamp uses some older version of the css flex model and just like... every browser has to support this now

youtube uses webkit line clamp. google uses webkit line clamp. there is no alternative to it.

Yup, it works (at least with TalkBack)!

Since I'm not a screen reader user & don't do any user testing, however, I can't say whether or not that's a workaround people would prefer - hopefully as Cohost expands some folks using assistive tech will be willing to comment on CSS crimes with how they'd like things like this conveyed. 🙂

i have been sent on a mission by our mutual friend blindmusiclover to tell you, specifically, that they appreciate the joke here (they're stuck in activation queue hell)