|
1 | | -.content__default |
2 | | - code |
3 | | - color lighten($textColor, 20%) |
4 | | - padding 0.25rem 0.5rem |
5 | | - margin 0 |
6 | | - font-size 0.85em |
7 | | - background-color var(--code-color) |
8 | | - border-radius 3px |
9 | | - .token |
10 | | - &.deleted |
11 | | - color #EC5975 |
12 | | - &.inserted |
13 | | - color $accentColor |
14 | | - |
15 | | -.content__default |
16 | | - pre, pre[class*="language-"] |
17 | | - line-height 1.4 |
18 | | - padding 1.25rem 1.5rem |
19 | | - margin 0.85rem 0 |
20 | | - background-color $codeBgColor |
21 | | - border-radius 6px |
22 | | - overflow auto |
23 | | - code |
24 | | - color #fff |
25 | | - padding 0 |
26 | | - background-color transparent |
27 | | - border-radius 0 |
28 | | - |
29 | | -div[class*="language-"] |
30 | | - position relative |
31 | | - background-color $codeBgColor |
32 | | - border-radius 6px |
33 | | - .highlight-lines |
34 | | - user-select none |
35 | | - padding-top 1.3rem |
36 | | - position absolute |
37 | | - top 0 |
38 | | - left 0 |
39 | | - width 100% |
40 | | - line-height 1.4 |
41 | | - .highlighted |
42 | | - background-color rgba(0, 0, 0, 66%) |
43 | | - pre, pre[class*="language-"] |
44 | | - background transparent |
45 | | - position relative |
46 | | - z-index 1 |
47 | | - &::before |
48 | | - position absolute |
49 | | - z-index 3 |
50 | | - top 0.8em |
51 | | - right 1em |
52 | | - font-size 0.75rem |
53 | | - color rgba(255, 255, 255, 0.4) |
54 | | - &:not(.line-numbers-mode) |
55 | | - .line-numbers-wrapper |
56 | | - display none |
57 | | - &.line-numbers-mode |
58 | | - .highlight-lines .highlighted |
59 | | - position relative |
60 | | - &:before |
61 | | - content ' ' |
62 | | - position absolute |
63 | | - z-index 3 |
64 | | - left 0 |
65 | | - top 0 |
66 | | - display block |
67 | | - width $lineNumbersWrapperWidth |
68 | | - height 100% |
69 | | - background-color rgba(0, 0, 0, 66%) |
70 | | - pre |
71 | | - padding-left $lineNumbersWrapperWidth + 1 rem |
72 | | - vertical-align middle |
73 | | - .line-numbers-wrapper |
74 | | - position absolute |
75 | | - top 0 |
76 | | - width $lineNumbersWrapperWidth |
77 | | - text-align center |
78 | | - color rgba(255, 255, 255, 0.3) |
79 | | - padding 1.25rem 0 |
80 | | - line-height 1.4 |
81 | | - br |
82 | | - user-select none |
83 | | - .line-number |
84 | | - position relative |
85 | | - z-index 4 |
86 | | - user-select none |
87 | | - font-size 0.85em |
88 | | - &::after |
89 | | - content '' |
90 | | - position absolute |
91 | | - z-index 2 |
92 | | - top 0 |
93 | | - left 0 |
94 | | - width $lineNumbersWrapperWidth |
95 | | - height 100% |
96 | | - border-radius 6px 0 0 6px |
97 | | - border-right 1px solid rgba(0, 0, 0, 66%) |
98 | | - background-color $codeBgColor |
99 | | - |
100 | | - |
101 | | -for lang in $codeLang |
102 | | - div{'[class~="language-' + lang + '"]'} |
103 | | - &:before |
104 | | - content ('' + lang) |
105 | | - |
106 | | -div[class~="language-javascript"] |
107 | | - &:before |
108 | | - content "js" |
109 | | - |
110 | | -div[class~="language-typescript"] |
111 | | - &:before |
112 | | - content "ts" |
113 | | - |
114 | | -div[class~="language-markup"] |
115 | | - &:before |
116 | | - content "html" |
117 | | - |
118 | | -div[class~="language-markdown"] |
119 | | - &:before |
120 | | - content "md" |
121 | | - |
122 | | -div[class~="language-json"]:before |
123 | | - content "json" |
124 | | - |
125 | | -div[class~="language-ruby"]:before |
126 | | - content "rb" |
127 | | - |
128 | | -div[class~="language-python"]:before |
129 | | - content "py" |
130 | | - |
131 | | -div[class~="language-bash"]:before |
132 | | - content "sh" |
133 | | - |
134 | | -div[class~="language-php"]:before |
135 | | - content "php" |
| 1 | +//.content__default |
| 2 | +// code |
| 3 | +// color lighten($textColor, 20%) |
| 4 | +// padding 0.25rem 0.5rem |
| 5 | +// margin 0 |
| 6 | +// font-size 0.85em |
| 7 | +// background-color var(--code-color) |
| 8 | +// border-radius 3px |
| 9 | +// .token |
| 10 | +// &.deleted |
| 11 | +// color #EC5975 |
| 12 | +// &.inserted |
| 13 | +// color $accentColor |
| 14 | +// |
| 15 | +//.content__default |
| 16 | +// pre, pre[class*="language-"] |
| 17 | +// line-height 1.4 |
| 18 | +// padding 1.25rem 1.5rem |
| 19 | +// margin 0.85rem 0 |
| 20 | +// background-color $codeBgColor |
| 21 | +// border-radius 6px |
| 22 | +// overflow auto |
| 23 | +// code |
| 24 | +// color #fff |
| 25 | +// padding 0 |
| 26 | +// background-color transparent |
| 27 | +// border-radius 0 |
| 28 | +// |
| 29 | +//div[class*="language-"] |
| 30 | +// position relative |
| 31 | +// background-color $codeBgColor |
| 32 | +// border-radius 6px |
| 33 | +// .highlight-lines |
| 34 | +// user-select none |
| 35 | +// padding-top 1.3rem |
| 36 | +// position absolute |
| 37 | +// top 0 |
| 38 | +// left 0 |
| 39 | +// width 100% |
| 40 | +// line-height 1.4 |
| 41 | +// .highlighted |
| 42 | +// background-color rgba(0, 0, 0, 66%) |
| 43 | +// pre, pre[class*="language-"] |
| 44 | +// background transparent |
| 45 | +// position relative |
| 46 | +// z-index 1 |
| 47 | +// &::before |
| 48 | +// position absolute |
| 49 | +// z-index 3 |
| 50 | +// top 0.8em |
| 51 | +// right 1em |
| 52 | +// font-size 0.75rem |
| 53 | +// color rgba(255, 255, 255, 0.4) |
| 54 | +// &:not(.line-numbers-mode) |
| 55 | +// .line-numbers-wrapper |
| 56 | +// display none |
| 57 | +// &.line-numbers-mode |
| 58 | +// .highlight-lines .highlighted |
| 59 | +// position relative |
| 60 | +// &:before |
| 61 | +// content ' ' |
| 62 | +// position absolute |
| 63 | +// z-index 3 |
| 64 | +// left 0 |
| 65 | +// top 0 |
| 66 | +// display block |
| 67 | +// width $lineNumbersWrapperWidth |
| 68 | +// height 100% |
| 69 | +// background-color rgba(0, 0, 0, 66%) |
| 70 | +// pre |
| 71 | +// padding-left $lineNumbersWrapperWidth + 1 rem |
| 72 | +// vertical-align middle |
| 73 | +// .line-numbers-wrapper |
| 74 | +// position absolute |
| 75 | +// top 0 |
| 76 | +// width $lineNumbersWrapperWidth |
| 77 | +// text-align center |
| 78 | +// color rgba(255, 255, 255, 0.3) |
| 79 | +// padding 1.25rem 0 |
| 80 | +// line-height 1.4 |
| 81 | +// br |
| 82 | +// user-select none |
| 83 | +// .line-number |
| 84 | +// position relative |
| 85 | +// z-index 4 |
| 86 | +// user-select none |
| 87 | +// font-size 0.85em |
| 88 | +// &::after |
| 89 | +// content '' |
| 90 | +// position absolute |
| 91 | +// z-index 2 |
| 92 | +// top 0 |
| 93 | +// left 0 |
| 94 | +// width $lineNumbersWrapperWidth |
| 95 | +// height 100% |
| 96 | +// border-radius 6px 0 0 6px |
| 97 | +// border-right 1px solid rgba(0, 0, 0, 66%) |
| 98 | +// background-color $codeBgColor |
| 99 | +// |
| 100 | +// |
| 101 | +//for lang in $codeLang |
| 102 | +// div{'[class~="language-' + lang + '"]'} |
| 103 | +// &:before |
| 104 | +// content ('' + lang) |
| 105 | +// |
| 106 | +//div[class~="language-javascript"] |
| 107 | +// &:before |
| 108 | +// content "js" |
| 109 | +// |
| 110 | +//div[class~="language-typescript"] |
| 111 | +// &:before |
| 112 | +// content "ts" |
| 113 | +// |
| 114 | +//div[class~="language-markup"] |
| 115 | +// &:before |
| 116 | +// content "html" |
| 117 | +// |
| 118 | +//div[class~="language-markdown"] |
| 119 | +// &:before |
| 120 | +// content "md" |
| 121 | +// |
| 122 | +//div[class~="language-json"]:before |
| 123 | +// content "json" |
| 124 | +// |
| 125 | +//div[class~="language-ruby"]:before |
| 126 | +// content "rb" |
| 127 | +// |
| 128 | +//div[class~="language-python"]:before |
| 129 | +// content "py" |
| 130 | +// |
| 131 | +//div[class~="language-bash"]:before |
| 132 | +// content "sh" |
| 133 | +// |
| 134 | +//div[class~="language-php"]:before |
| 135 | +// content "php" |
0 commit comments