mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
Mobile improvements: - Fix content overflow issues on mobile devices - Optimize code blocks and tables for small screens - Add proper word-wrapping and container constraints Dark mode enhancements: - Replace icons with modern sun/moon designs - Implement smooth icon switching with CSS transitions - Simplify toggle logic for better performance Resolves mobile layout issues and enhances theme switching experience
79 lines
1.3 KiB
CSS
79 lines
1.3 KiB
CSS
code {
|
|
@apply text-indigo-600;
|
|
@apply dark:text-slate-300;
|
|
}
|
|
|
|
pre {
|
|
line-height: 1.5;
|
|
word-wrap: break-word;
|
|
white-space: pre-wrap;
|
|
|
|
@apply overflow-hidden overflow-x-auto bg-white p-4;
|
|
}
|
|
|
|
pre:is(.dark *) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.mdLayout pre + p:not(:last-child) {
|
|
@apply border-t border-slate-200;
|
|
@apply dark:border-slate-700/50;
|
|
}
|
|
|
|
/* When there is only one pre code block, the scroll bar is displayed at the bottom */
|
|
pre:only-child {
|
|
@apply h-full;
|
|
}
|
|
|
|
pre > code {
|
|
color: #345;
|
|
padding: 0 !important;
|
|
background: transparent;
|
|
overflow: visible;
|
|
}
|
|
|
|
pre > code.wrap {
|
|
@apply whitespace-pre-wrap break-words !important;
|
|
}
|
|
|
|
@media (width <= 768px) {
|
|
pre {
|
|
@apply text-sm;
|
|
|
|
max-width: 100%;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
pre > code {
|
|
white-space: pre-wrap;
|
|
word-wrap: break-word;
|
|
overflow-wrap: break-word;
|
|
}
|
|
}
|
|
|
|
.mdLayout .line-highlight {
|
|
transform: translate3d(0, 2px, 0);
|
|
background: linear-gradient(to right, rgb(20 175 131 / 5%) 25%, transparent);
|
|
}
|
|
|
|
.mdLayout .line-highlight[data-end] {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.mdLayout .line-highlight::before,
|
|
.mdLayout .line-highlight::after {
|
|
display: none;
|
|
}
|
|
|
|
.mdLayout code.hljs {
|
|
background: transparent;
|
|
}
|
|
|
|
.note-content pre {
|
|
padding: 6px 0 !important;
|
|
}
|
|
|
|
.note-content pre code {
|
|
padding: 1rem !important;
|
|
}
|