PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.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 +46 -180 1.27.71.13.0 View file →
@@ -1,34 +1,27 @@
1 1 /*! purgecss start ignore */
2 2 .wp-block-kevinbatdorf-code-block-pro {
3 - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
4 - monospace; /* no !important */
3 + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; /* no !important */
5 4 direction: ltr;
6 - -webkit-text-size-adjust: 100%;
7 5 @apply relative box-border;
8 - * {
9 - @apply box-border;
10 - }
11 6 }
12 -.wp-block-kevinbatdorf-code-block-pro {
13 - pre,
14 - pre * {
15 - font-size: inherit;
16 - line-height: inherit;
17 - }
7 +.wp-block-kevinbatdorf-code-block-pro * {
8 + @apply box-border;
18 9 }
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 +}
19 15 .wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre {
20 16 border: 0;
21 - overflow-wrap: normal;
17 + overflow-wrap:normal;
22 18 padding: 16px;
23 19 padding-right: 0;
24 20 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;
21 + @apply overflow-auto text-inherit text-left m-0 whitespace-pre bg-none border-none border-0 rounded-none shadow-none;
26 22 }
27 -.wp-block-kevinbatdorf-code-block-pro.padding-disabled:not(
28 - .code-block-pro-editor
29 - )
30 - pre {
23 +.wp-block-kevinbatdorf-code-block-pro.padding-disabled:not(.code-block-pro-editor) pre {
31 24 @apply p-0;
32 25 }
33 26 .wp-block-kevinbatdorf-code-block-pro.padding-bottom-disabled pre {
34 27 @apply pb-0;
@@ -35,32 +28,16 @@
35 28 }
36 29 .wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre code {
37 30 border: 0;
38 31 background: none;
39 - overflow-wrap: normal;
32 + overflow-wrap:normal;
40 33 font-family: inherit;
41 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;
42 35 }
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%);
36 +.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre code .line {
37 + @apply inline-block w-full;
49 38 }
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));
57 -}
58 -.wp-block-kevinbatdorf-code-block-pro.cbp-has-line-numbers:not(
59 - .code-block-pro-editor
60 - )
61 - pre
62 - code {
39 +.wp-block-kevinbatdorf-code-block-pro.cbp-has-line-numbers:not(.code-block-pro-editor) pre code {
63 40 counter-reset: step;
64 41 counter-increment: step calc(var(--cbp-line-number-start, 1) - 1);
65 42 }
66 43
@@ -66,22 +43,15 @@
66 43
67 44 .wp-block-kevinbatdorf-code-block-pro pre code .line {
68 45 @apply relative;
69 46 }
70 -.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor)
71 - pre
72 - code
73 - .line::before {
47 +.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre code .line::before {
74 48 content: '';
75 49 @apply inline-block;
76 50 }
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;
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;
84 54 content: counter(step);
85 55 color: var(--cbp-line-number-color, #999);
86 56 width: var(--cbp-line-number-width, auto);
87 57 user-select: none;
@@ -86,72 +56,28 @@
86 56 width: var(--cbp-line-number-width, auto);
87 57 user-select: none;
88 58 counter-increment: step;
89 59 }
90 -.wp-block-kevinbatdorf-code-block-pro.cbp-highlight-hover .line {
91 - min-height: var(--cbp-block-height, 100%);
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;
63 +} */
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;
92 70 }
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 - }
126 -} */
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
140 - pre
141 - .line.cbp-line-highlight::after {
71 +.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor).padding-disabled pre .line.cbp-line-highlight::after {
142 72 @apply left-0 w-full;
143 73 }
144 -.wp-block-kevinbatdorf-code-block-pro.cbp-blur-enabled
145 - pre
146 - .line:not(.cbp-no-blur) {
147 - filter: blur(1.35px);
148 - @apply opacity-80 transition-all duration-200 pointer-events-none;
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 77 }
150 -.wp-block-kevinbatdorf-code-block-pro.cbp-blur-enabled.cbp-unblur-on-hover:hover
151 - pre
152 - .line:not(.cbp-no-blur) {
153 - @apply blur-none opacity-100 pointer-events-auto;
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 80 }
155 81 .wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre * {
156 82 font-family: inherit;
157 83 }
@@ -162,24 +88,13 @@
162 88 box-shadow: inset 0 0 100px 100px rgba(255, 255, 255, 0.1);
163 89 }
164 90 .code-block-pro-copy-button {
165 91 border: 0;
92 + background: none;
166 93 padding: 6px;
167 - @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;
94 + @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;
168 95 }
169 -
170 -.code-block-pro-copy-button:not([data-has-text-button]) {
171 - background: none;
172 - @apply bg-transparent;
173 -}
174 -/* Keep this selector aggressively specific */
175 -body .wp-block-kevinbatdorf-code-block-pro:not(#x) .code-block-pro-copy-button-pre,
176 -body .wp-block-kevinbatdorf-code-block-pro:not(#x) .code-block-pro-copy-button-textarea {
177 - clip: rect(0, 0, 0, 0);
178 - @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;
179 -}
180 -.wp-block-kevinbatdorf-code-block-pro.padding-disabled
181 - .code-block-pro-copy-button {
96 +.wp-block-kevinbatdorf-code-block-pro.padding-disabled .code-block-pro-copy-button {
182 97 padding: 0;
183 98 }
184 99 .wp-block-kevinbatdorf-code-block-pro:hover .code-block-pro-copy-button {
185 100 @apply opacity-50;
@@ -187,68 +102,19 @@
187 102 /* .wp-block-kevinbatdorf-code-block-pro .code-block-pro-copy-button:active, */
188 103 .wp-block-kevinbatdorf-code-block-pro .code-block-pro-copy-button:hover {
189 104 @apply opacity-90;
190 105 }
191 -.wp-block-kevinbatdorf-code-block-pro:hover .code-block-pro-copy-button[data-has-text-button],
192 -.code-block-pro-copy-button[data-has-text-button] {
193 - @apply opacity-100;
106 +.code-block-pro-copy-button .without-check {
107 + @apply block;
194 108 }
195 -.wp-block-kevinbatdorf-code-block-pro .code-block-pro-copy-button[data-has-text-button]:hover {
196 - @apply opacity-80;
109 +.code-block-pro-copy-button .with-check {
110 + @apply hidden;
197 111 }
198 -.code-block-pro-copy-button[data-has-text-button] {
199 - margin-top: 0.7rem;
200 - @apply block rounded-xl mr-3 py-0.5 px-1.5;
112 +.code-block-pro-copy-button.copying .without-check {
113 + @apply hidden;
201 114 }
202 -.code-block-pro-copy-button[data-inside-header-type^="headlights"],
203 -.code-block-pro-copy-button[data-inside-header-type="headlightsMuted"] {
204 - margin-top: 0.85rem;
115 +.code-block-pro-copy-button.copying .with-check {
116 + @apply block;
205 117 }
206 -.code-block-pro-copy-button[data-inside-header-type="headlightsMutedAlt"] {
207 - margin-top: 0.65rem;
208 -}
209 -.code-block-pro-copy-button[data-inside-header-type="simpleString"] {
210 - margin-top: 0.645rem;
211 -}
212 -.code-block-pro-copy-button[data-inside-header-type="pillString"] {
213 - @apply mt-4;
214 -}
215 -.code-block-pro-copy-button[data-inside-header-type="pillString"] .cbp-btn-text {
216 - @apply relative top-px;
217 -}
218 -.cbp-btn-text {
219 - @apply text-xs;
220 -}
221 -
222 -.code-block-pro-copy-button {
223 - .without-check {
224 - @apply block;
225 - }
226 - .with-check {
227 - @apply hidden;
228 - }
229 -}
230 -.code-block-pro-copy-button.cbp-copying {
231 - @apply opacity-100;
232 - .without-check {
233 - @apply hidden;
234 - }
235 - .with-check {
236 - @apply block;
237 - }
238 -}
239 118 .cbp-footer-link {
240 119 @apply hover:underline;
241 -}
242 -@media print {
243 - .wp-block-kevinbatdorf-code-block-pro pre {
244 - max-height: none !important;
245 - }
246 - .wp-block-kevinbatdorf-code-block-pro:not(#x) .line::before {
247 - background-color: transparent !important;
248 - color: inherit !important;
249 - }
250 - .wp-block-kevinbatdorf-code-block-pro:not(#x) > span,
251 - .wp-block-kevinbatdorf-code-block-pro:not(#x) .cbp-line-highlighter {
252 - display: none !important;
253 - }
254 120 }