refactor: dedupe torchlight dark mode styles
This commit is contained in:
parent
840e4686f9
commit
2c1ee814ee
@ -174,19 +174,9 @@
|
||||
View
|
||||
</summary>
|
||||
@if (is_string($fromHighlight) && $fromHighlight !== '')
|
||||
<style>
|
||||
html.dark code.torchlight {
|
||||
background-color: var(--phiki-dark-background-color) !important;
|
||||
}
|
||||
|
||||
html.dark .phiki,
|
||||
html.dark .phiki span {
|
||||
color: var(--phiki-dark-color) !important;
|
||||
font-style: var(--phiki-dark-font-style) !important;
|
||||
font-weight: var(--phiki-dark-font-weight) !important;
|
||||
text-decoration: var(--phiki-dark-text-decoration) !important;
|
||||
}
|
||||
</style>
|
||||
@once
|
||||
@include('filament.partials.torchlight-dark-overrides')
|
||||
@endonce
|
||||
|
||||
<div class="mt-2 overflow-x-auto">{!! $fromHighlight !!}</div>
|
||||
@else
|
||||
@ -205,19 +195,9 @@
|
||||
View
|
||||
</summary>
|
||||
@if (is_string($toHighlight) && $toHighlight !== '')
|
||||
<style>
|
||||
html.dark code.torchlight {
|
||||
background-color: var(--phiki-dark-background-color) !important;
|
||||
}
|
||||
|
||||
html.dark .phiki,
|
||||
html.dark .phiki span {
|
||||
color: var(--phiki-dark-color) !important;
|
||||
font-style: var(--phiki-dark-font-style) !important;
|
||||
font-weight: var(--phiki-dark-font-weight) !important;
|
||||
text-decoration: var(--phiki-dark-text-decoration) !important;
|
||||
}
|
||||
</style>
|
||||
@once
|
||||
@include('filament.partials.torchlight-dark-overrides')
|
||||
@endonce
|
||||
|
||||
<div class="mt-2 overflow-x-auto">{!! $toHighlight !!}</div>
|
||||
@else
|
||||
@ -249,19 +229,9 @@
|
||||
@endphp
|
||||
|
||||
@if (is_string($highlighted) && $highlighted !== '')
|
||||
<style>
|
||||
html.dark code.torchlight {
|
||||
background-color: var(--phiki-dark-background-color) !important;
|
||||
}
|
||||
|
||||
html.dark .phiki,
|
||||
html.dark .phiki span {
|
||||
color: var(--phiki-dark-color) !important;
|
||||
font-style: var(--phiki-dark-font-style) !important;
|
||||
font-weight: var(--phiki-dark-font-weight) !important;
|
||||
text-decoration: var(--phiki-dark-text-decoration) !important;
|
||||
}
|
||||
</style>
|
||||
@once
|
||||
@include('filament.partials.torchlight-dark-overrides')
|
||||
@endonce
|
||||
|
||||
<div class="mt-2 overflow-x-auto">{!! $highlighted !!}</div>
|
||||
@else
|
||||
|
||||
@ -209,19 +209,9 @@
|
||||
|
||||
<div x-show="open" x-cloak>
|
||||
@if (is_string($highlightedHtml) && $highlightedHtml !== '')
|
||||
<style>
|
||||
html.dark code.torchlight {
|
||||
background-color: var(--phiki-dark-background-color) !important;
|
||||
}
|
||||
|
||||
html.dark .phiki,
|
||||
html.dark .phiki span {
|
||||
color: var(--phiki-dark-color) !important;
|
||||
font-style: var(--phiki-dark-font-style) !important;
|
||||
font-weight: var(--phiki-dark-font-weight) !important;
|
||||
text-decoration: var(--phiki-dark-text-decoration) !important;
|
||||
}
|
||||
</style>
|
||||
@once
|
||||
@include('filament.partials.torchlight-dark-overrides')
|
||||
@endonce
|
||||
|
||||
<div class="overflow-x-auto">{!! $highlightedHtml !!}</div>
|
||||
@else
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
<style>
|
||||
html.dark code.torchlight {
|
||||
background-color: var(--phiki-dark-background-color) !important;
|
||||
}
|
||||
|
||||
html.dark .phiki,
|
||||
html.dark .phiki span {
|
||||
color: var(--phiki-dark-color) !important;
|
||||
font-style: var(--phiki-dark-font-style) !important;
|
||||
font-weight: var(--phiki-dark-font-weight) !important;
|
||||
text-decoration: var(--phiki-dark-text-decoration) !important;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user