| @@ -1,24 +1,109 @@ | ||
| 1 | 1 | /*! purgecss start ignore */ |
| 2 | 2 | .wp-block-kevinbatdorf-code-block-pro { |
| 3 | - direction: ltr !important; | |
| 3 | + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; /* no !important */ | |
| 4 | + direction: ltr; | |
| 5 | + @apply relative box-border; | |
| 6 | +} | |
| 7 | +.wp-block-kevinbatdorf-code-block-pro * { | |
| 8 | + @apply box-border; | |
| 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 | +} | |
| 15 | +.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; | |
| 22 | +} | |
| 23 | +.wp-block-kevinbatdorf-code-block-pro.padding-disabled:not(.code-block-pro-editor) pre { | |
| 24 | + @apply p-0; | |
| 25 | +} | |
| 26 | +.wp-block-kevinbatdorf-code-block-pro.padding-bottom-disabled pre { | |
| 27 | + @apply pb-0; | |
| 28 | +} | |
| 29 | +.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; | |
| 35 | +} | |
| 36 | +.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre code .line { | |
| 37 | + @apply inline-block w-full; | |
| 38 | +} | |
| 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); | |
| 42 | +} | |
| 43 | + | |
| 44 | +.wp-block-kevinbatdorf-code-block-pro pre code .line { | |
| 4 | 45 | @apply relative; |
| 5 | 46 | } |
| 6 | -.wp-block-kevinbatdorf-code-block-pro pre { | |
| 7 | - overflow-wrap: break-word; | |
| 8 | - @apply overflow-auto p-6 whitespace-pre-wrap text-inherit; | |
| 47 | +.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre code .line::before { | |
| 48 | + content: ''; | |
| 49 | + @apply inline-block; | |
| 9 | 50 | } |
| 10 | -.wp-block-kevinbatdorf-code-block-pro pre code { | |
| 11 | - @apply m-0 p-0 bg-transparent text-inherit; | |
| 12 | - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, | |
| 13 | - monospace; | |
| 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; | |
| 14 | 59 | } |
| 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; | |
| 70 | +} | |
| 71 | +.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor).padding-disabled pre .line.cbp-line-highlight::after { | |
| 72 | + @apply left-0 w-full; | |
| 73 | +} | |
| 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; | |
| 77 | +} | |
| 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; | |
| 80 | +} | |
| 81 | +.wp-block-kevinbatdorf-code-block-pro:not(.code-block-pro-editor) pre * { | |
| 82 | + font-family: inherit; | |
| 83 | +} | |
| 84 | +.cbp-see-more-simple-btn-hover { | |
| 85 | + @apply transition-none; | |
| 86 | +} | |
| 87 | +.cbp-see-more-simple-btn-hover:hover { | |
| 88 | + box-shadow: inset 0 0 100px 100px rgba(255, 255, 255, 0.1); | |
| 89 | +} | |
| 15 | 90 | .code-block-pro-copy-button { |
| 16 | - @apply absolute top-0 right-0 left-auto bg-transparent p-2 border-none cursor-pointer opacity-30 focus:opacity-100 transition-opacity duration-200 ease-in-out leading-none; | |
| 91 | + border: 0; | |
| 92 | + background: none; | |
| 93 | + padding: 6px; | |
| 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; | |
| 17 | 95 | } |
| 96 | +.wp-block-kevinbatdorf-code-block-pro.padding-disabled .code-block-pro-copy-button { | |
| 97 | + padding: 0; | |
| 98 | +} | |
| 18 | 99 | .wp-block-kevinbatdorf-code-block-pro:hover .code-block-pro-copy-button { |
| 19 | - @apply opacity-100; | |
| 100 | + @apply opacity-50; | |
| 20 | 101 | } |
| 102 | +/* .wp-block-kevinbatdorf-code-block-pro .code-block-pro-copy-button:active, */ | |
| 103 | +.wp-block-kevinbatdorf-code-block-pro .code-block-pro-copy-button:hover { | |
| 104 | + @apply opacity-90; | |
| 105 | +} | |
| 21 | 106 | .code-block-pro-copy-button .without-check { |
| 22 | 107 | @apply block; |
| 23 | 108 | } |
| 24 | 109 | .code-block-pro-copy-button .with-check { |
| @@ -28,5 +113,8 @@ | ||
| 28 | 113 | @apply hidden; |
| 29 | 114 | } |
| 30 | 115 | .code-block-pro-copy-button.copying .with-check { |
| 31 | 116 | @apply block; |
| 117 | +} | |
| 118 | +.cbp-footer-link { | |
| 119 | + @apply hover:underline; | |
| 32 | 120 | } |