timber / docs

Static site documentation for Timber
https://timber.github.io/docs/
2 stars 9 forks source link

Remove margin from code blocks inside links #69

Closed aj-adl closed 11 months ago

aj-adl commented 2 years ago

Fixes #68

## Issue

See #68 / see https://share.getcloudapp.com/eDu7ow5w

Solution

Remove the horizontal margin on <code> blocks, to prevent the strange "wrapping underscores" we see in the docs - https://share.getcloudapp.com/eDu7ow5w.

Uses CSS "has" to add the horizontal margin back onto the parent link element where the browser supports it, otherwise visual change is minor.

Impact

Little to none, besides being visually nicer.

Usage Changes

Browsers that do no support :has will have slightly cozier spacing on text surrounding a <code> block

Considerations

gchtr commented 11 months ago

Great, thanks for taking the time to put together a PR, @aj-adl! 🙌 This is now live on https://timber.github.io/docs/.