Files
Fechin 43a3c7100f feat: improve mobile responsiveness and dark mode UX
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
2025-06-21 10:07:49 +08:00

159 lines
3.0 KiB
CSS

.mdLayout table {
width: 100%;
table-layout: fixed;
word-wrap: break-word;
}
.mdLayout .section > table:last-child::after {
content: '';
@apply block h-2;
}
.mdLayout table tr + tr {
border-top: solid 1px #ececec94;
@apply dark:border-slate-700/50;
}
.mdLayout table tbody + tbody {
border-top: solid 1px rgb(135 137 139 / 30%);
}
.mdLayout table td,
.mdLayout table th {
padding: 9px 14px;
text-align: left;
}
.mdLayout table tr th:last-child,
.mdLayout table tr td:last-child {
text-align: right;
}
.mdLayout table td[rowspan] {
vertical-align: middle !important;
}
.mdLayout table td[colspan] {
text-align: center !important;
}
.mdLayout table td:first-child {
white-space: nowrap;
}
@media (width <= 768px) {
.mdLayout table td:first-child {
white-space: normal;
word-wrap: break-word;
}
}
.mdLayout table td:first-child > code {
@apply text-indigo-600;
}
.mdLayout table a,
.mdLayout table a:visited {
color: #35a;
text-decoration: none;
}
.mdLayout table td:first-child > code ~ em {
font-size: 11px;
font-style: normal;
color: #567;
}
.mdLayout table thead {
display: none;
}
.mdLayout table thead th {
font-weight: normal;
}
.mdLayout table.shortcuts td:not(:last-child) > code,
.mdLayout ul.shortcuts > li > code,
kbd {
letter-spacing: 0.075rem;
/* margin: 0px 0.1em; */
padding: 0.1em 0.54em;
border: 1px solid rgb(204 204 204);
line-height: 1.6;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
display: inline-block;
background-color: rgb(247 247 247);
box-shadow:
0 1px 0 rgb(0 0 0 / 20%),
0 0 0 2px #fff inset;
border-radius: 3px;
/* text-shadow: 0 1px 0 #fff; */
color: #303835;
@apply dark:border-indigo-700 dark:bg-indigo-700/50 dark:text-indigo-300 dark:shadow-none dark:shadow-indigo-500;
}
.mdLayout table.left-text tr th,
.mdLayout table.left-text tr td,
.mdLayout table.left-text tr td:last-child {
text-align: left;
}
.mdLayout table.center-text tr th,
.mdLayout table.center-text tr td,
.mdLayout table.center-text tr td:last-child {
text-align: center;
}
.mdLayout table.show-header thead {
display: table-header-group;
border-bottom: solid 1px rgb(85 102 119 / 30%);
}
.mdLayout table.bold-first tr > td:first-child {
font-weight: bold;
}
.mdLayout table.plus-first tr > td:first-child {
@apply text-2xl;
}
.mdLayout table.no-wrap td,
.mdLayout table.no-wrap th {
white-space: nowrap;
}
.mdLayout table td em {
opacity: 0.6;
@apply dark:opacity-90;
}
.mdLayout table.style-list td + td,
.mdLayout table.style-list-arrow td + td {
padding-top: 0 !important;
}
.mdLayout table.style-list td,
.mdLayout table.style-list-arrow td {
display: block;
text-align: left !important;
}
.mdLayout table.style-list-arrow td:first-child::before,
ul.style-arrow li::before {
content: '';
display: inline-block;
width: 0;
height: 0;
border-right: 6px solid transparent;
border-top: 5px solid transparent;
border-left: 6px solid #228e6c;
border-bottom: 5px solid transparent;
}