PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.18.0
Code Block Pro – Beautiful Syntax Highlighting v1.18.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
code-block-pro / src / editor / editor.css

editor.css in Code Block Pro – Beautiful Syntax Highlighting 1.18.0, at src/editor/editor.css

133 lines 3.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 .code-block-pro-editor {
2 --tw-ring-inset: var(--tw-empty, /*!*/ /*!*/);
3 --tw-ring-offset-width: 0px;
4 --tw-ring-offset-color: transparent;
5 --tw-ring-color: var(--wp-admin-theme-color);
6 --tw-translate-x: 0;
7 --tw-translate-y: 0;
8 --tw-rotate: 0;
9 --tw-skew-x: 0;
10 --tw-skew-y: 0;
11 --tw-scale-x: 1;
12 --tw-scale-y: 1;
13 }
14 .code-block-pro-editor *,
15 .code-block-pro-editor *:after,
16 .code-block-pro-editor *:before {
17 box-sizing: border-box;
18 /* border: 0 solid #e5e7eb; */
19 }
20 @tailwind base;
21 @tailwind components;
22 @tailwind utilities;
23 /* Add more styles here specific to the editor only */
24 .code-block-pro-editor .npm__react-simple-code-editor__textarea {
25 @apply shadow-none;
26 }
27 .code-block-pro-editor pre,
28 .code-block-pro-editor pre * {
29 font-family: inherit !important;
30 font-size: inherit !important;
31 line-height: inherit !important;
32 }
33 .code-block-pro-editor textarea,
34 .code-block-pro-editor pre {
35 @apply m-0 text-left focus:outline-none;
36 min-height: 36px;
37 direction: ltr !important;
38 }
39 .code-block-pro-editor.cbp-has-line-numbers pre {
40 counter-reset: step;
41 counter-increment: step calc(var(--cbp-line-number-start, 1) - 1);
42 padding-right: 0;
43 }
44 .code-block-pro-editor pre .line {
45 @apply relative inline-block w-full;
46 }
47 .code-block-pro-editor:not(.padding-disabled) pre .line:empty {
48 @apply block;
49 }
50 .code-block-pro-editor.padding-disabled.cbp-has-line-numbers pre .line:empty {
51 @apply block;
52 }
53 .code-block-pro-editor.cbp-has-line-numbers
54 pre
55 .line:not(.cbp-line-number-disabled)::before {
56 @apply inline-block text-right opacity-50 absolute;
57 margin-right: 12px;
58 content: counter(step);
59 color: var(--cbp-line-number-color, #999);
60 width: var(--cbp-line-number-width, auto);
61 user-select: none;
62 counter-increment: step;
63 left: calc(var(--cbp-line-number-width, 0) * -1 - 16px);
64 }
65
66 .code-block-pro-editor.padding-disabled:not(.cbp-has-line-numbers) pre {
67 @apply p-0;
68 }
69 .code-block-pro-editor.padding-disabled.cbp-has-line-numbers pre {
70 @apply py-0;
71 }
72 /* Will make sure the line numbers are full width before calculating */
73 .code-block-pro-editor.cbp-has-line-numbers
74 pre
75 .line.cbp-line-number-width-forced,
76 .code-block-pro-editor.cbp-has-line-numbers pre .line.cbp-line-number-disabled {
77 @apply inline;
78 }
79 .code-block-pro-editor.cbp-has-line-numbers
80 pre
81 .line.cbp-line-number-width-forced::before {
82 width: auto !important;
83 position: initial;
84 }
85 .code-block-pro-editor .cbp-footer-link {
86 @apply pointer-events-none no-underline;
87 }
88
89 /* Just to make it look similar to the front end */
90 .code-block-pro-editor pre .line.cbp-line-highlight::after {
91 content: '';
92 background: var(--cbp-line-highlight-color, rgb(14 165 233/0.2));
93 @apply absolute top-0 h-full;
94 left: -100% !important;
95 width: 1000% !important;
96 min-height: var(--cbp-line-height) !important;
97 }
98
99 .code-block-pro-editor code {
100 font-family: inherit !important;
101 @apply m-0 p-0 text-inherit bg-transparent;
102 }
103
104 .cbp-input-error {
105 --tw-ring-color: rgb(239 68 68);
106 --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0
107 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
108 --tw-ring-shadow: var(--tw-ring-inset) 0 0 0
109 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
110 border-color: rgb(239 68 68) !important;
111 box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
112 var(--tw-shadow, 0 0 #0000) !important;
113 }
114
115 .code-block-pro-editor .code-block-pro-copy-button {
116 display: block !important;
117 @apply pointer-events-none;
118 }
119 .cbp-theme-preview {
120 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
121 monospace; /* no !important */
122 direction: ltr;
123 }
124
125 @font-face {
126 font-family: 'Code-Pro-Fira-Code';
127 src: url('../fonts/Code-Pro-Fira-Code.woff2') format('woff2');
128 }
129 @font-face {
130 font-family: 'Code-Pro-JetBrains-Mono';
131 src: url('../fonts/Code-Pro-JetBrains-Mono.woff2') format('woff2');
132 }
133