janoside / btc-rpc-explorer

Database-free, self-hosted Bitcoin explorer, via RPC to Bitcoin Core.
https://bitcoinexplorer.org
MIT License
1.48k stars 1.11k forks source link

quote ref wrap (missing nbsp) #506

Closed jsarenik closed 1 year ago

jsarenik commented 1 year ago

Describe the bug

This caught my eye and is noticeable mostly on mobile (narrow screen) devices. The final bracket in each quote ref, something like (ref <bi-box-arrow-up-right>) — see screenshot — may end up on a line by itself.

Environment (please complete the following information):

bitcoinexplorer.org's environment

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://bitcoinexplorer.org/snippet/quote/random
  2. Press F12 (works both in Chrome and Firefox)
  3. Dock the panel to right, inside the browser window
  4. Move the slider between the rendered random quote and docked web development panel until either the last bracket or even the box gets wrapped to the next line
  5. See the eye-candy
(ref [↗]
)

or

(ref 
[↗])

or

(
ref [↗])

Additional context

The quote link box is in views/includes/shared-mixins.pug line 900.

Using &nbsp; to separate contents in brackets would make the ref more compact, esp. since (ref [↗]) is very narrow and should rather stay together and not get wrapped. Solving this issue may be too costly with current code so maybe take this just as a random graffiti time-stamp.

Screenshot_20230130-074453_Chrome