You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When giving examples of bash (or other REPL) commands, often you want to include the $ or prompt for context to distinguish from output, but then the $ or prompt must be manually removed before pasting.
It might make sense to create a Hugo shortcode to handle this. It could use pseudo-elements to show the $, which would make them visible but not (by default on most browsers) copyable. On screen readers the content would appear as it does now (most screen readers treat pseudo-elements as elements), which I think is acceptable.
I think the potential downsides here are a lack of simplicity, and also making future migrations more difficult, as we'd be using more Hugo-specific features. However, I think this would improve the user experience. I'd be happy to write the shortcode if we think it's a good idea.
The text was updated successfully, but these errors were encountered:
This was raised in PR #218.
When giving examples of bash (or other REPL) commands, often you want to include the
$
or prompt for context to distinguish from output, but then the$
or prompt must be manually removed before pasting.It might make sense to create a Hugo shortcode to handle this. It could use pseudo-elements to show the
$
, which would make them visible but not (by default on most browsers) copyable. On screen readers the content would appear as it does now (most screen readers treat pseudo-elements as elements), which I think is acceptable.I think the potential downsides here are a lack of simplicity, and also making future migrations more difficult, as we'd be using more Hugo-specific features. However, I think this would improve the user experience. I'd be happy to write the shortcode if we think it's a good idea.
The text was updated successfully, but these errors were encountered: