pradyunsg / furo

A clean customizable documentation theme for Sphinx
https://pradyunsg.me/furo/quickstart
MIT License
2.76k stars 317 forks source link

Make prompts non-selectable in `console` code fences #286

Closed astrojuanlu closed 2 years ago

astrojuanlu commented 2 years ago

What's happening?

I noticed that the classic and alabaster themes add a user-select: none; property to div.highlight span.gp after sphinx-doc/sphinx#6727 and sphinx-doc/sphinx#9120, which I find quite nice.

It would be cool if furo could mimic this behavior.

(Comes from https://github.com/pradyunsg/furo/discussions/284)

Reproducer

  1. Add code fence to Sphinx documentation:
```console
(.venv) $ pip install furo


2. Build HTML with `alabaster` theme
3. Notice that the prompt can't be selected
4. Change theme to `furo`
5. Notice that the prompt *can* be selected

### Expectation

I'd expect Furo to behave like other Sphinx themes.

### Code of Conduct

- [X] I agree to follow the [Code of Conduct](https://github.com/pradyunsg/furo/blob/main/CODE_OF_CONDUCT.md).
pradyunsg commented 2 years ago

Fixed in https://github.com/pradyunsg/furo/commit/fe6217c18dda5d79eda0a17705ee6a03850262dc.