google / eleventy-high-performance-blog

A high performance blog template for the 11ty static site generator.
https://www.industrialempathy.com/posts/eleventy-high-performance-blog/
MIT License
4.03k stars 283 forks source link

Fix code syntax highlight style issue when without given language #167

Closed flameddd closed 1 year ago

flameddd commented 1 year ago

Issue

Code syntax highlight style broken when without given language (screenshot in below).

Fix

Update style for without given language

How to test

Past following text into any Markdown file and review it

``` redis> zrange zset 0 -1

  1. "b"
  2. "ba"
  3. "bar"
  4. "bar*"
  5. "f"
  6. "fo"
  7. "foo"
  8. "foo*"
  9. "foob"
  10. "fooba"
  11. "foobar"
  12. "foobar*" ```

Note

Currently Firefox did NOT support :has() yet, but it's looks acceptable (for this small fix).

See Firefox screenshot in blow

Screenshot Before

Screen Shot 2023-02-15 at 17 38 52

Screenshot After, Brave

Screen Shot 2023-02-15 at 17 39 59

Screenshot After, Safari

Screen Shot 2023-02-15 at 17 40 29

Screenshot After, Firefox

11ty_fix_firefox