svhighlight
svhighlight copied to clipboard
A code syntax highlighter for Svelte using highlight.js, with line blur, highligthing, and focus buttons. The component can be easily customized with Tailwind CSS.
Mentioned to create an issue, so here it is. ![image](https://user-images.githubusercontent.com/25551312/234345914-d70f04a3-88d5-4b9d-88b7-29c79fc32bda.png) ```svelte // import { CodeBlock as SkeletonCodeBock } from '@skeletonlabs/skeleton'; import { CodeBlock } from 'svhighlight'; import 'highlight.js/styles/base16/darktooth.css'; const code...
Example for light/dark mode button: https://codelabs.developers.google.com/create-an-instant-and-seamless-web-app#5
Highlighted lines don't highlight the entire line on a mobile screen. This can also be tested in the browser by reducing the screen size. ![image](https://user-images.githubusercontent.com/20195536/215589181-b4c08be9-04f0-4ee3-b1b7-e14099f46a87.png)