Releases: metonym/svelte-highlight
Releases · metonym/svelte-highlight
v7.7.0
v7.6.1
v7.6.0
Features
- add
--langtag-top
,--langtag-right
style props
The Highlight
components support style props to customize the langtag
, if displayed.
The default value for --langtag-top
and --langtag-right
is 0
.
<HighlightAuto
{code}
langtag
--langtag-top="0.5rem"
--langtag-right="0.5rem"
--langtag-background="linear-gradient(135deg, #2996cf, 80%, white)"
--langtag-color="#fff"
--langtag-border-radius="6px"
--langtag-padding="0.5rem"
/>
v7.5.0
Features
- add
--langtag-padding
style prop
The Highlight
components support style props to customize the langtag
, if displayed.
The default value for --langtag-padding
is "1em"
.
<HighlightAuto
{code}
langtag
--langtag-background="linear-gradient(135deg, #2996cf, 80%, white)"
--langtag-color="#fff"
--langtag-border-radius="6px"
--langtag-padding="0.5rem"
/>
v7.4.8
Fixes
- add missing
exports
to allow importing fromsvelte-highlight/styles
andsvelte-highlight/languages
(#316, 12e7830)
This fix supports the following import variations:
// Base import for styles/languages
import { _default } from "svelte-highlight/styles";
import { _1c } from "svelte-highlight/languages";
// Explicit index
import { _default } from "svelte-highlight/styles/index";
import { typescript } from "svelte-highlight/languages/index";
// Explicit extension
import lang from "svelte-highlight/languages/1c.js"
import style from "svelte-highlight/styles/3024.js";