ptpb / pb

pb is a formerly-lightweight pastebin and url shortener
Other
549 stars 52 forks source link

Pygments styles not applied propperly for dark background styles #234

Open NausX opened 5 years ago

NausX commented 5 years ago

For example :

https://ptpb.pw/9Ezk/bash?style=vim

According to the Pygments demo, this should render a black background styled code as seen here :

http://pygments.org/demo/6770298/?style=vim

Although, it only change the very background of the page (behind the code) to black but the code still have a white background. The syntax coloring of the code itself (the text) is ok, it's only the background.

I consider it as minor, but would be nice to see it fix. I might later fork and send a merge request when I get some spare time (could take a while) if nobody fix it in the meantime.

Good day.

buhman commented 5 years ago

Related: https://github.com/ptpb/pbs/issues/2 https://github.com/ptpb/pbs/commit/103f9c6071296093886820fa3c00367e37bb95e8

This might be a less compilation issue: pbs/code.less#L11; not sure.

The syntax coloring of the code itself (the text) is ok

It isn't, oddly.

screenshot

buhman commented 5 years ago

Fixing this (correctly) might involve client-side lighten/darken relative to the body background-color.

https://caniuse.com/#feat=css-filters