| @@ -1,22 +1,22 @@ | ||
| 1 | 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; | |
| 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 | 13 | } |
| 14 | 14 | .code-block-pro-editor *, |
| 15 | 15 | .code-block-pro-editor *:after, |
| 16 | 16 | .code-block-pro-editor *:before { |
| 17 | - box-sizing: border-box; | |
| 18 | - /* border: 0 solid #e5e7eb; */ | |
| 17 | + box-sizing: border-box; | |
| 18 | + /* border: 0 solid #e5e7eb; */ | |
| 19 | 19 | } |
| 20 | 20 | @tailwind base; |
| 21 | 21 | @tailwind components; |
| 22 | 22 | @tailwind utilities; |
| @@ -21,159 +21,101 @@ | ||
| 21 | 21 | @tailwind components; |
| 22 | 22 | @tailwind utilities; |
| 23 | 23 | /* Add more styles here specific to the editor only */ |
| 24 | 24 | .code-block-pro-editor .npm__react-simple-code-editor__textarea { |
| 25 | - @apply shadow-none; | |
| 25 | + @apply shadow-none; | |
| 26 | 26 | } |
| 27 | 27 | .code-block-pro-editor pre, |
| 28 | 28 | .code-block-pro-editor pre * { |
| 29 | - font-family: inherit !important; | |
| 30 | - font-size: inherit !important; | |
| 31 | - line-height: inherit !important; | |
| 29 | + font-family: inherit !important; | |
| 30 | + font-size: inherit !important; | |
| 31 | + line-height: inherit !important; | |
| 32 | 32 | } |
| 33 | 33 | .code-block-pro-editor textarea, |
| 34 | 34 | .code-block-pro-editor pre { |
| 35 | - @apply m-0 text-left focus:outline-none; | |
| 36 | - min-height: 36px; | |
| 37 | - direction: ltr !important; | |
| 35 | + @apply m-0 text-left focus:outline-none; | |
| 36 | + direction: ltr !important; | |
| 38 | 37 | } |
| 39 | 38 | .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; | |
| 39 | + counter-reset: step; | |
| 40 | + counter-increment: step calc(var(--cbp-line-number-start, 1) - 1); | |
| 41 | + padding-right: 0; | |
| 43 | 42 | } |
| 44 | 43 | .code-block-pro-editor pre .line { |
| 45 | - @apply relative inline-block w-full; | |
| 44 | + @apply relative inline-block w-full; | |
| 46 | 45 | } |
| 47 | -.code-block-pro-editor pre { | |
| 48 | - .line:empty { | |
| 49 | - @apply block; | |
| 50 | - } | |
| 51 | - .line span:empty { | |
| 52 | - @apply inline-block; | |
| 53 | - } | |
| 46 | +.code-block-pro-editor:not(.padding-disabled) pre .line:empty { | |
| 47 | + @apply block; | |
| 54 | 48 | } |
| 55 | -.code-block-pro-editor.cbp-has-line-numbers | |
| 56 | - pre | |
| 57 | - .line:not(.cbp-line-number-disabled)::before { | |
| 58 | - @apply inline-block text-right opacity-50 absolute; | |
| 59 | - margin-right: 12px; | |
| 60 | - content: counter(step); | |
| 61 | - color: var(--cbp-line-number-color, #999); | |
| 62 | - width: var(--cbp-line-number-width, auto); | |
| 63 | - user-select: none; | |
| 64 | - counter-increment: step; | |
| 65 | - left: calc(var(--cbp-line-number-width, 0) * -1 - 16px); | |
| 49 | +.code-block-pro-editor.padding-disabled.cbp-has-line-numbers pre .line:empty { | |
| 50 | + @apply block; | |
| 66 | 51 | } |
| 52 | +.code-block-pro-editor.cbp-has-line-numbers pre .line:not(.cbp-line-number-disabled)::before { | |
| 53 | + @apply inline-block text-right opacity-50 absolute; | |
| 54 | + margin-right: 12px; | |
| 55 | + content: counter(step); | |
| 56 | + color: var(--cbp-line-number-color, #999); | |
| 57 | + width: var(--cbp-line-number-width, auto); | |
| 58 | + user-select: none; | |
| 59 | + counter-increment: step; | |
| 60 | + left: calc(var(--cbp-line-number-width, 0) * -1 - 16px); | |
| 61 | +} | |
| 67 | 62 | |
| 68 | 63 | .code-block-pro-editor.padding-disabled:not(.cbp-has-line-numbers) pre { |
| 69 | - @apply p-0; | |
| 64 | + @apply p-0; | |
| 70 | 65 | } |
| 71 | 66 | .code-block-pro-editor.padding-disabled.cbp-has-line-numbers pre { |
| 72 | - @apply py-0; | |
| 67 | + @apply py-0; | |
| 73 | 68 | } |
| 69 | +/* Will make sure the line numbers are full width before calculating */ | |
| 70 | +.code-block-pro-editor.cbp-has-line-numbers pre .line.cbp-line-number-width-forced, | |
| 71 | +.code-block-pro-editor.cbp-has-line-numbers pre .line.cbp-line-number-disabled { | |
| 72 | + @apply inline; | |
| 73 | +} | |
| 74 | +.code-block-pro-editor.cbp-has-line-numbers pre .line.cbp-line-number-width-forced::before { | |
| 75 | + width: auto !important; | |
| 76 | + position: initial; | |
| 77 | +} | |
| 74 | 78 | .code-block-pro-editor .cbp-footer-link { |
| 75 | - @apply pointer-events-none no-underline; | |
| 79 | + @apply pointer-events-none no-underline; | |
| 76 | 80 | } |
| 77 | 81 | |
| 78 | 82 | /* Just to make it look similar to the front end */ |
| 79 | 83 | .code-block-pro-editor pre .line.cbp-line-highlight::after { |
| 80 | - content: ""; | |
| 81 | - background: var(--cbp-line-highlight-color, rgb(14 165 233 / 0.2)); | |
| 82 | - @apply absolute top-0 h-full; | |
| 83 | - left: -100% !important; | |
| 84 | - width: 1000% !important; | |
| 85 | - min-height: var(--cbp-line-height) !important; | |
| 84 | + content: ''; | |
| 85 | + background: var(--cbp-line-highlight-color, rgb(14 165 233/.2)); | |
| 86 | + @apply absolute top-0 h-full; | |
| 87 | + left: -100% !important; | |
| 88 | + width: 1000%!important; | |
| 89 | + min-height: var(--cbp-line-height) !important; | |
| 86 | 90 | } |
| 87 | 91 | |
| 88 | 92 | .code-block-pro-editor code { |
| 89 | - font-family: inherit !important; | |
| 90 | - @apply m-0 p-0 text-inherit bg-transparent; | |
| 93 | + font-family: inherit !important; | |
| 94 | + @apply m-0 p-0 text-inherit bg-transparent; | |
| 91 | 95 | } |
| 92 | 96 | |
| 93 | 97 | .cbp-input-error { |
| 94 | - --tw-ring-color: rgb(239 68 68); | |
| 95 | - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 | |
| 96 | - var(--tw-ring-offset-width) var(--tw-ring-offset-color); | |
| 97 | - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 | |
| 98 | - calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); | |
| 99 | - border-color: rgb(239 68 68) !important; | |
| 100 | - box-shadow: | |
| 101 | - var(--tw-ring-offset-shadow), var(--tw-ring-shadow), | |
| 102 | - var(--tw-shadow, 0 0 #0000) !important; | |
| 98 | + --tw-ring-color: rgb(239 68 68); | |
| 99 | + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); | |
| 100 | + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); | |
| 101 | + border-color: rgb(239 68 68) !important; | |
| 102 | + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)!important; | |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | .code-block-pro-editor .code-block-pro-copy-button { |
| 106 | - display: block !important; | |
| 107 | - @apply pointer-events-none; | |
| 106 | + display: block !important; | |
| 107 | + @apply pointer-events-none; | |
| 108 | 108 | } |
| 109 | -.code-block-pro-editor .sidebar-copy-button svg { | |
| 110 | - @apply block; | |
| 111 | -} | |
| 112 | -.code-block-pro-editor .sidebar-copy-button .with-check { | |
| 113 | - @apply hidden; | |
| 114 | -} | |
| 115 | 109 | .cbp-theme-preview { |
| 116 | - font-family: | |
| 117 | - ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; /* no !important */ | |
| 118 | - direction: ltr; | |
| 110 | + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; /* no !important */ | |
| 111 | + direction: ltr; | |
| 119 | 112 | } |
| 113 | + | |
| 120 | 114 | @font-face { |
| 121 | - font-family: "Code-Pro-Fira-Code"; | |
| 122 | - src: url("../fonts/Code-Pro-Fira-Code.woff2") format("woff2"); | |
| 115 | + font-family: 'Code-Pro-Fira-Code'; | |
| 116 | + src: url('../fonts/Code-Pro-Fira-Code.woff2') format('woff2'); | |
| 123 | 117 | } |
| 124 | 118 | @font-face { |
| 125 | - font-family: "Code-Pro-JetBrains-Mono"; | |
| 126 | - src: url("../fonts/Code-Pro-JetBrains-Mono.woff2") format("woff2"); | |
| 127 | -} | |
| 128 | -@font-face { | |
| 129 | - font-family: "Code-Pro-JetBrains-Mono-NL"; | |
| 130 | - src: url("../fonts/Code-Pro-JetBrains-Mono-NL.ttf") format("truetype"); | |
| 131 | -} | |
| 132 | -@font-face { | |
| 133 | - font-family: "Code-Pro-Comic-Mono"; | |
| 134 | - src: url("../fonts/Code-Pro-Comic-Mono.ttf") format("truetype"); | |
| 135 | -} | |
| 136 | -@font-face { | |
| 137 | - font-family: "Code-Pro-Roboto-Mono"; | |
| 138 | - src: url("../fonts/Code-Pro-Roboto-Mono.ttf") format("truetype"); | |
| 139 | -} | |
| 140 | -@font-face { | |
| 141 | - font-family: "Code-Pro-Fantasque-Sans-Mono"; | |
| 142 | - src: url("../fonts/Code-Pro-Fantasque-Sans-Mono.woff2") format("woff2"); | |
| 143 | -} | |
| 144 | -@font-face { | |
| 145 | - font-family: "Code-Pro-Cozette"; | |
| 146 | - src: url("../fonts/Code-Pro-Cozette.woff2") format("woff2"); | |
| 147 | -} | |
| 148 | -@font-face { | |
| 149 | - font-family: "Code-Pro-Deja-Vu-Mono"; | |
| 150 | - src: url("../fonts/Code-Pro-Deja-Vu-Mono.ttf") format("truetype"); | |
| 151 | -} | |
| 152 | -@font-face { | |
| 153 | - font-family: "Code-Pro-Monaspace-Argon"; | |
| 154 | - src: url("../fonts/Code-Pro-Monaspace-Argon.woff") format("woff"); | |
| 155 | -} | |
| 156 | -@font-face { | |
| 157 | - font-family: "Code-Pro-Monaspace-Krypton"; | |
| 158 | - src: url("../fonts/Code-Pro-Monaspace-Krypton.woff") format("woff"); | |
| 159 | -} | |
| 160 | -@font-face { | |
| 161 | - font-family: "Code-Pro-Monaspace-Neon"; | |
| 162 | - src: url("../fonts/Code-Pro-Monaspace-Neon.woff") format("woff"); | |
| 163 | -} | |
| 164 | -@font-face { | |
| 165 | - font-family: "Code-Pro-Monaspace-Radon"; | |
| 166 | - src: url("../fonts/Code-Pro-Monaspace-Radon.woff") format("woff"); | |
| 167 | -} | |
| 168 | -@font-face { | |
| 169 | - font-family: "Code-Pro-Monaspace-Xenon"; | |
| 170 | - src: url("../fonts/Code-Pro-Monaspace-Xenon.woff") format("woff"); | |
| 171 | -} | |
| 172 | -@font-face { | |
| 173 | - font-family: "Code-Pro-Geist-Mono"; | |
| 174 | - src: url("../fonts/Code-Pro-Geist-Mono.woff2") format("woff2"); | |
| 175 | -} | |
| 176 | -@font-face { | |
| 177 | - font-family: "Code-Pro-Hack"; | |
| 178 | - src: url("../fonts/Code-Pro-Hack.woff2") format("woff2"); | |
| 119 | + font-family: 'Code-Pro-JetBrains-Mono'; | |
| 120 | + src: url('../fonts/Code-Pro-JetBrains-Mono.woff2') format('woff2'); | |
| 179 | 121 | } |