[openstreetmap/openstreetmap-website] Add expansion of time info on touch and mouse activation (PR #4361)
Andy Allan
notifications at github.com
Wed Nov 22 11:12:53 UTC 2023
@gravitystorm commented on this pull request.
> @@ -50,6 +50,10 @@ small, aside {
time[title] {
text-decoration: underline dotted;
}
+time[title]:active::after,
+time[title]:focus::after {
+ content: " (" attr(title) ")";
This isn't particularly i18n friendly, because it hard-codes the characters used for parenthesis and adds a space character, which might not be wanted in some languages e.g. japanese etc (I don't know for sure, but that's why we leave this to our translators, who are the experts!).
If you want to show some text that's not a perfect match for the existing title attribute, then it would be better to add the new text as a different attribute, and use the i18n system to construct that new display text.
I'm also concerned about whether this works properly for RTL text, but I haven't assessed that.
Overall, this feels like a "neat hack", but using CSS interactions to inject content into the text doesn't feel to me like a particularly robust method.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4361#pullrequestreview-1744137182
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4361/review/1744137182 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231122/b9a7a0f5/attachment.htm>
More information about the rails-dev
mailing list