PluginProbe
Code Snippets / 3.6.6
Code Snippets v3.6.6
3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 3.0.1 All 64 releases
code-snippets / css / prism.scss

prism.scss in Code Snippets 3.6.6, at css/prism.scss

83 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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: 1em 0 1em 3em;
14 }
15
16 .line-highlight {
17 position: absolute;
18 left: 0;
19 right: 0;
20 padding: inherit;
21 margin-top: 1em;
22 background: hsla(24, 20%, 50%, .08);
23 background: linear-gradient(to right, hsla(24, 20%, 50%, .1) 70%, hsla(24, 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 top: .4em;
36 left: .6em;
37 min-width: 1em;
38 padding: 0 .5em;
39 background-color: hsla(24, 20%, 50%, .4);
40 color: hsl(24, 20%, 95%);
41 font: bold 65%/1.5 sans-serif;
42 text-align: center;
43 vertical-align: .3em;
44 border-radius: 999px;
45 text-shadow: none;
46 box-shadow: 0 1px white;
47 }
48
49 &[data-end]]:after {
50 content: attr(data-end);
51 top: auto;
52 bottom: .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 :not(.is-style-prism-shades-of-purple) pre[class*=language-]*=language-].line-numbers & {
62 box-sizing: border-box;
63 padding: 0;
64 margin: 1em 0 0;
65 }
66
67 .is-style-prism-coy-without-shadows pre[class*=language-]*=language-] & {
68 margin-top: 0;
69 }
70 }
71
72 pre[id]].linkable-line-numbers span.line-numbers-rows {
73 pointer-events: all;
74
75 > span:before {
76 cursor: pointer;
77 }
78
79 > span:hover:before {
80 background-color: rgba(128, 128, 128, .2);
81 }
82 }
83