PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.28.0
Code Block Pro – Beautiful Syntax Highlighting v1.28.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
← All changes | src/front/style.css +221 -76 1.9.21.28.0 View file →
@@ -1,114 +1,259 @@
1 1 /*! purgecss start ignore */
2 2 .wp-block-kevinbatdorf-code-block-pro {
3 - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; /* no !important */
4 - direction: ltr;
5 - @apply relative box-border;
3 + font-family:
4 + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; /* no !important */
5 + direction: ltr;
6 + -webkit-text-size-adjust: 100%;
7 + @apply relative box-border;
8 + * {
9 + @apply box-border;
10 + }
6 11 }
7 -.wp-block-kevinbatdorf-code-block-pro * {
8 - @apply box-border;
12 +.wp-block-kevinbatdorf-code-block-pro {
13 + pre,
14 + pre * {
15 + font-size: inherit;
16 + line-height: inherit;
17 + }
9 18 }
10 -.wp-block-kevinbatdorf-code-block-pro pre,
11 -.wp-block-kevinbatdorf-code-block-pro pre * {
12 - font-size: inherit;
13 - line-height: inherit;
14 -}
15 19 .wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre {
16 - border: 0;
17 - overflow-wrap:normal;
18 - padding: 16px;
19 - padding-right: 0;
20 - font-family: inherit;
21 - @apply overflow-auto text-inherit text-left m-0 whitespace-pre bg-none border-none border-0 rounded-none shadow-none;
20 + border: 0;
21 + overflow-wrap: normal;
22 + padding: 16px;
23 + padding-right: 0;
24 + font-family: inherit;
25 + @apply overflow-auto text-inherit text-left m-0 whitespace-pre bg-none border-none border-0 rounded-none shadow-none outline-none focus-visible:outline-inherit;
22 26 }
23 -.wp-block-kevinbatdorf-code-block-pro.padding-disabled:not(.code-block-pro-editor) pre {
24 - @apply p-0;
27 +.wp-block-kevinbatdorf-code-block-pro.padding-disabled:not(
28 + .code-block-pro-editor
29 + )
30 + pre {
31 + @apply p-0;
25 32 }
26 33 .wp-block-kevinbatdorf-code-block-pro.padding-bottom-disabled pre {
27 - @apply pb-0;
34 + @apply pb-0;
28 35 }
29 36 .wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre code {
30 - border: 0;
31 - background: none;
32 - overflow-wrap:normal;
33 - font-family: inherit;
34 - @apply block w-full m-0 p-0 bg-transparent text-inherit text-left whitespace-pre border-none border-0 rounded-none shadow-none;
37 + border: 0;
38 + background: none;
39 + overflow-wrap: normal;
40 + font-family: inherit;
41 + @apply block w-full m-0 p-0 bg-transparent text-inherit text-left whitespace-pre border-none border-0 rounded-none shadow-none;
35 42 }
36 -.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre code .line {
37 - @apply inline-block w-full;
43 +.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor)
44 + pre
45 + code
46 + .line {
47 + @apply inline-block align-top;
48 + min-width: var(--cbp-block-width, 100%);
38 49 }
39 -.wp-block-kevinbatdorf-code-block-pro.cbp-has-line-numbers:not(.code-block-pro-editor) pre code {
40 - counter-reset: step;
41 - counter-increment: step calc(var(--cbp-line-number-start, 1) - 1);
50 +.wp-block-kevinbatdorf-code-block-pro.cbp-has-line-numbers:not(
51 + .code-block-pro-editor
52 + )
53 + pre
54 + code
55 + .line {
56 + padding-left: calc(12px + var(--cbp-line-number-width, auto));
42 57 }
58 +.wp-block-kevinbatdorf-code-block-pro.cbp-has-line-numbers:not(
59 + .code-block-pro-editor
60 + )
61 + pre
62 + code {
63 + counter-reset: step;
64 + counter-increment: step calc(var(--cbp-line-number-start, 1) - 1);
65 +}
43 66
44 67 .wp-block-kevinbatdorf-code-block-pro pre code .line {
45 - @apply relative;
68 + @apply relative;
46 69 }
47 -.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre code .line::before {
48 - content: '';
49 - @apply inline-block;
70 +.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor)
71 + pre
72 + code
73 + .line::before {
74 + content: "";
75 + @apply inline-block;
50 76 }
51 -.wp-block-kevinbatdorf-code-block-pro.cbp-has-line-numbers:not(.code-block-pro-editor) pre code .line:not(.cbp-line-number-disabled)::before {
52 - @apply inline-block text-right opacity-50 transition-opacity duration-500;
53 - margin-right: 12px;
54 - content: counter(step);
55 - color: var(--cbp-line-number-color, #999);
56 - width: var(--cbp-line-number-width, auto);
57 - user-select: none;
58 - counter-increment: step;
77 +.wp-block-kevinbatdorf-code-block-pro.cbp-has-line-numbers:not(
78 + .code-block-pro-editor
79 + )
80 + pre
81 + code
82 + .line:not(.cbp-line-number-disabled)::before {
83 + @apply absolute left-0 text-right opacity-50 transition-opacity duration-500;
84 + content: counter(step);
85 + color: var(--cbp-line-number-color, #999);
86 + width: var(--cbp-line-number-width, auto);
87 + user-select: none;
88 + counter-increment: step;
59 89 }
60 -/* Temporary removed until I can make this an option */
61 -/* .wp-block-kevinbatdorf-code-block-pro.cbp-has-line-numbers:not(.code-block-pro-editor) pre code .line:hover::before {
62 - @apply opacity-100;
90 +.wp-block-kevinbatdorf-code-block-pro.cbp-highlight-hover .line {
91 + min-height: var(--cbp-block-height, 100%);
92 +}
93 +.wp-block-kevinbatdorf-code-block-pro {
94 + &.cbp-highlight-hover:not(.cbp-blur-enabled:not(.cbp-unblur-on-hover))
95 + .line:hover,
96 + .line.cbp-no-blur:hover,
97 + .line.cbp-line-highlight {
98 + .cbp-line-highlighter {
99 + @apply w-full pointer-events-none absolute top-0;
100 + background: var(--cbp-line-highlight-color, rgb(14 165 233 / 0.2));
101 + min-height: var(--cbp-block-height, 100%);
102 + min-width: calc(var(--cbp-block-width, 100%) + 16px);
103 + left: -16px;
104 + [data-code-block-pro-font-family='Code-Pro-Comic-Mono.ttf']& {
105 + @apply -top-0.5;
106 + }
107 + [data-code-block-pro-font-family='Code-Pro-Fira-Code']& {
108 + top: -1.5px !important;
109 + }
110 + [data-code-block-pro-font-family='Code-Pro-Cozette']&,
111 + [data-code-block-pro-font-family='Code-Pro-Deja-Vu-Mono.ttf']& {
112 + top: -1px !important;
113 + }
114 + }
115 + }
116 +}
117 +/* [data-code-block-pro-font-family='Code-Pro-Comic-Mono.ttf'].cbp-highlight-hover {
118 + .line,
119 + .line:hover,
120 + .line.cbp-no-blur:hover,
121 + .line.cbp-line-highlight {
122 + .cbp-line-highlighter {
123 + @apply -top-0.5;
124 + }
125 + }
63 126 } */
64 -.wp-block-kevinbatdorf-code-block-pro pre .line.cbp-line-highlight .cbp-line-highlighter {
65 - background: var(--cbp-line-highlight-color, rgb(14 165 233/.2));
66 - width: 100%;
67 - min-width: calc(var(--cbp-block-width, 100%));
68 - left: -16px;
69 - @apply absolute top-0 h-full;
127 +/* [data-code-block-pro-font-family='Code-Pro-Fira-Code'].cbp-highlight-hover {
128 + .line,
129 + .line:hover,
130 + .line.cbp-no-blur:hover,
131 + .line.cbp-line-highlight {
132 + .cbp-line-highlighter {
133 + top: -1.5px !important;
134 + }
135 + }
136 +} */
137 +.wp-block-kevinbatdorf-code-block-pro:not(
138 + .code-block-pro-editor
139 + ).padding-disabled pre
140 + .line.cbp-line-highlight::after {
141 + @apply left-0 w-full;
70 142 }
71 -.wp-block-kevinbatdorf-code-block-pro.padding-disabled pre .line.cbp-line-highlight::after {
72 - @apply left-0 w-full;
143 +.wp-block-kevinbatdorf-code-block-pro.cbp-blur-enabled
144 + pre
145 + .line:not(.cbp-no-blur) {
146 + filter: blur(1.35px);
147 + @apply opacity-80 transition-all duration-200 pointer-events-none;
73 148 }
74 -.wp-block-kevinbatdorf-code-block-pro.cbp-blur-enabled pre .line:not(.cbp-no-blur) {
75 - filter: blur(1px);
76 - @apply opacity-40 transition-all duration-200;
149 +.wp-block-kevinbatdorf-code-block-pro.cbp-blur-enabled.cbp-unblur-on-hover:hover
150 + pre
151 + .line:not(.cbp-no-blur) {
152 + @apply blur-none opacity-100 pointer-events-auto;
77 153 }
78 -.wp-block-kevinbatdorf-code-block-pro.cbp-blur-enabled.cbp-unblur-on-hover:hover pre .line:not(.cbp-no-blur) {
79 - @apply blur-none opacity-100;
154 +.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre * {
155 + font-family: inherit;
80 156 }
81 -.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre * {
82 - font-family: inherit;
157 +.cbp-see-more-simple-btn-hover {
158 + @apply transition-none;
83 159 }
160 +.cbp-see-more-simple-btn-hover:hover {
161 + box-shadow: inset 0 0 100px 100px rgba(255, 255, 255, 0.1);
162 +}
84 163 .code-block-pro-copy-button {
85 - border: 0;
86 - background: none;
87 - padding: 6px;
88 - @apply absolute top-0 right-0 left-auto bg-transparent border-none border-0 cursor-pointer opacity-10 focus:opacity-40 transition-opacity duration-200 ease-in-out leading-none z-10;
164 + border: 0;
165 + padding: 6px;
166 + @apply absolute top-0 right-0 left-auto border-none border-0 cursor-pointer opacity-10 focus:opacity-40 transition-opacity duration-200 ease-in-out leading-none z-10 outline-none focus-visible:outline-inherit;
89 167 }
90 -.wp-block-kevinbatdorf-code-block-pro.padding-disabled .code-block-pro-copy-button {
91 - padding: 0;
168 +
169 +.code-block-pro-copy-button:not([data-has-text-button]) {
170 + background: none;
171 + @apply bg-transparent;
92 172 }
173 +/* Keep this selector aggressively specific */
174 +body .wp-block-kevinbatdorf-code-block-pro:not(#x)
175 + .code-block-pro-copy-button-pre,
176 +body
177 + .wp-block-kevinbatdorf-code-block-pro:not(#x)
178 + .code-block-pro-copy-button-textarea {
179 + clip: rect(0, 0, 0, 0);
180 + @apply absolute top-0 left-0 w-px h-px opacity-0 pointer-events-none -m-1 overflow-hidden resize-none border-0 shadow-none bg-transparent text-transparent whitespace-nowrap;
181 +}
182 +.wp-block-kevinbatdorf-code-block-pro.padding-disabled
183 + .code-block-pro-copy-button {
184 + padding: 0;
185 +}
93 186 .wp-block-kevinbatdorf-code-block-pro:hover .code-block-pro-copy-button {
94 - @apply opacity-50;
187 + @apply opacity-50;
95 188 }
96 189 /* .wp-block-kevinbatdorf-code-block-pro .code-block-pro-copy-button:active, */
97 190 .wp-block-kevinbatdorf-code-block-pro .code-block-pro-copy-button:hover {
98 - @apply opacity-90;
191 + @apply opacity-90;
99 192 }
100 -.code-block-pro-copy-button .without-check {
101 - @apply block;
193 +.wp-block-kevinbatdorf-code-block-pro:hover
194 + .code-block-pro-copy-button[data-has-text-button],
195 +.code-block-pro-copy-button[data-has-text-button] {
196 + @apply opacity-100;
102 197 }
103 -.code-block-pro-copy-button .with-check {
104 - @apply hidden;
198 +.wp-block-kevinbatdorf-code-block-pro
199 + .code-block-pro-copy-button[data-has-text-button]:hover {
200 + @apply opacity-80;
105 201 }
106 -.code-block-pro-copy-button.copying .without-check {
107 - @apply hidden;
202 +.code-block-pro-copy-button[data-has-text-button] {
203 + margin-top: 0.7rem;
204 + @apply block rounded-xl mr-3 py-0.5 px-1.5;
108 205 }
109 -.code-block-pro-copy-button.copying .with-check {
110 - @apply block;
206 +.code-block-pro-copy-button[data-inside-header-type^="headlights"],
207 +.code-block-pro-copy-button[data-inside-header-type="headlightsMuted"] {
208 + margin-top: 0.85rem;
111 209 }
210 +.code-block-pro-copy-button[data-inside-header-type="headlightsMutedAlt"] {
211 + margin-top: 0.65rem;
212 +}
213 +.code-block-pro-copy-button[data-inside-header-type="simpleString"] {
214 + margin-top: 0.645rem;
215 +}
216 +.code-block-pro-copy-button[data-inside-header-type="pillString"] {
217 + @apply mt-4;
218 +}
219 +.code-block-pro-copy-button[data-inside-header-type="pillString"]
220 + .cbp-btn-text {
221 + @apply relative top-px;
222 +}
223 +.cbp-btn-text {
224 + @apply text-xs;
225 +}
226 +
227 +.code-block-pro-copy-button {
228 + .without-check {
229 + @apply block;
230 + }
231 + .with-check {
232 + @apply hidden;
233 + }
234 +}
235 +.code-block-pro-copy-button.cbp-copying {
236 + @apply opacity-100;
237 + .without-check {
238 + @apply hidden;
239 + }
240 + .with-check {
241 + @apply block;
242 + }
243 +}
112 244 .cbp-footer-link {
113 - @apply hover:underline;
245 + @apply hover:underline;
246 +}
247 +@media print {
248 + .wp-block-kevinbatdorf-code-block-pro pre {
249 + max-height: none !important;
250 + }
251 + .wp-block-kevinbatdorf-code-block-pro:not(#x) .line::before {
252 + background-color: transparent !important;
253 + color: inherit !important;
254 + }
255 + .wp-block-kevinbatdorf-code-block-pro:not(#x) > span,
256 + .wp-block-kevinbatdorf-code-block-pro:not(#x) .cbp-line-highlighter {
257 + display: none !important;
258 + }
114 259 }