Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/code-snippets/css/prism.scss

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + @import '~prismjs/themes/prism.css';
2 + @import '~prismjs/plugins/line-numbers/prism-line-numbers.css';
3 + @import '~prismjs/plugins/toolbar/prism-toolbar.css';
4 + @import '~prismjs/plugins/inline-color/prism-inline-color.css';
5 + @import '~prismjs/plugins/previewers/prism-previewers.css';
6 + @import '~prismjs/plugins/autolinker/prism-autolinker.css';
7 +
8 + /* These lines are taken from '~prismjs/plugins/inline-color/prism-inline-color.css', adjusted to avoid autoprefixer
9 + complaining about deprecated syntax. Ideally, they can be removed if the file in question is updated. */
10 +
11 + pre[data-line] {
12 + position: relative;
13 + padding-block: 1em;
14 + padding-inline: 3em 0;
15 + }
16 +
17 + .line-highlight {
18 + position: absolute;
19 + inset-inline: 0;
20 + padding: inherit;
21 + margin-block-start: 1em;
22 + background: hsl(24deg 20% 50% / 8%);
23 + background: linear-gradient(to right, hsl(24deg 20% 50% / 10%) 70%, hsl(24deg 20% 50% / 0%));
24 + pointer-events: none;
25 + line-height: inherit;
26 + white-space: pre;
27 +
28 + @media print {
29 + print-color-adjust: exact;
30 + }
31 +
32 + &::before, &[data-end]::after {
33 + content: attr(data-start);
34 + position: absolute;
35 + inset-block-start: .4em;
36 + inset-inline-start: .6em;
37 + min-inline-size: 1em;
38 + padding-block: 0;
39 + padding-inline: .5em;
40 + background-color: hsl(24deg 20% 50% / 40%);
41 + color: hsl(24deg 20% 95%);
42 + font: bold 65%/1.5 sans-serif;
43 + text-align: center;
44 + vertical-align: .3em;
45 + border-radius: 999px;
46 + text-shadow: none;
47 + box-shadow: 0 1px white;
48 + }
49 +
50 + &[data-end]::after {
51 + content: attr(data-end);
52 + inset-block: auto .4em;
53 + }
54 +
55 + .line-numbers &::before, .line-numbers &::after {
56 + content: none;
57 + }
58 +
59 + /* Additional fixes to the behaviour of line highlighting with certain themes. */
60 +
61 + .is-style-prism-coy-without-shadows pre[class*="language-"] & {
62 + margin-block-start: 0;
63 + }
64 +
65 + :not(.is-style-prism-shades-of-purple) pre[class*="language-"].line-numbers & {
66 + box-sizing: border-box;
67 + padding: 0;
68 + margin-block: 1em 0;
69 + margin-inline: 0;
70 + }
71 + }
72 +
73 + pre[id].linkable-line-numbers span.line-numbers-rows {
74 + pointer-events: all;
75 +
76 + > span::before {
77 + cursor: pointer;
78 + }
79 +
80 + > span:hover::before {
81 + background-color: rgb(128 128 128 / 20%);
82 + }
83 + }
84 +