Closed ruslaniv closed 3 weeks ago
Hello,
The default theme indeed uses a background-color for some tokens: https://github.com/PrismJS/prism/blob/master/themes/prism.css#L109-L110
You should be able to easily override that CSS rule to remove the background on your end.
Information
Description Some tokens have background color that is different from the background color of the page proper which does not make for a good reading experience
Code snippet
[Test page](https://prismjs.com/test.html#language=python&text=import%20functools%20%20%0Aimport%20time%20%20%0Afrom%20typing%20import%20Callable%2C%20Any%20%20%0A%3C%2Fbr%3E%0Adef%20async_timed()%3A%20%20%0A%09def%20wrapper(func%3A%20Callable)%20-%3E%20Callable%3A%20%20%0A%09%40functools.wraps(func)%20%20%0A%09%09async%20def%20wrapped(*args%2C%20**kwargs)%20-%3E%20Any%3A%20%20%0A%09%09%09print(f'starting%20%7Bfunc%7D%20with%20args%20%7Bargs%7D%20%7Bkwargs%7D')%20start%20%3D%20time.time()%20%20%0A%09%09%09try%3A%20%20%0A%09%09%09%09return%20await%20func(*args%2C%20**kwargs)%20finally%3A%20%20%0A%09%09%09%09end%20%3D%20time.time()%20%20%0A%09%09%09%09total%20%3D%20end%20-%20start%20%20%0A%09%09%09%09print(f'finished%20%7Bfunc%7D%20in%20%7Btotal%3A.4f%7D%20second(s)')%20%20%0A%09%09%09return%20wrapped%20%20%0A%09%09return%20wrapper%20%20%0A)