NixOS / nixos-homepage

Sources for nixos.org
https://nixos.org
304 stars 316 forks source link

[Techstack-beta] Make prompts unselectable #1380

Open jtojnar opened 6 months ago

jtojnar commented 6 months ago

Describe the glitch

The prompts on the download page regressed yet again. They can be selected, which prevents easy copying. Previously:

Also in Nixpkgs:

Additional context

It needs user-select: none CSS property.

thilobillerbeck commented 6 months ago

Good point, just anyone grabs this, since we process most of the prompts from markdown, we may can introduce a e.g. remark plugin which processes bash code snippets in such a way, that it has the structure to readily apply the non selectable properties.

Maybe the highlighter also added some consistent naming to the prompt, although we should check upfront how much this is prone to break in the future, since it is clearly not meant to be hooked into

(good job GitHub Mobile btw. for just duplicating my old post and appending the new one onto that when appending... 💀)