Skip to content

Commit 296cbd4

Browse files
committed
feat: new comrak
1 parent 03b1d55 commit 296cbd4

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

example/src/index.css

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,3 +1467,101 @@
14671467
border-color: var(--borderColor-default, #30363d);
14681468
}
14691469
}
1470+
1471+
1472+
/* Responsive iframe and math styles for markdown content */
1473+
.markdown-body iframe {
1474+
max-width: 100%;
1475+
border: none;
1476+
}
1477+
1478+
.markdown-body .math-code-block,
1479+
.markdown-body .math-display,
1480+
.markdown-body .math-inline {
1481+
overflow-x: auto;
1482+
max-width: 100%;
1483+
-webkit-overflow-scrolling: touch;
1484+
padding: 1rem 0;
1485+
/* Increased padding for all math blocks */
1486+
line-height: normal !important;
1487+
}
1488+
1489+
.markdown-body .math-code-block {
1490+
margin: 1.25rem 0;
1491+
}
1492+
1493+
.markdown-body .math-inline {
1494+
display: inline-block;
1495+
vertical-align: middle;
1496+
/* Middle is safer for multiline equations */
1497+
padding: 0.75rem 0 0.75rem 0;
1498+
/* Extra bottom padding for scrollbar */
1499+
max-width: 100%;
1500+
/* Maintain sharpness without forcing sub-pixel clipping */
1501+
backface-visibility: hidden;
1502+
-webkit-font-smoothing: subpixel-antialiased;
1503+
}
1504+
1505+
.markdown-body .math-code-block svg,
1506+
.markdown-body .math-display svg,
1507+
.markdown-body .math-inline svg {
1508+
max-width: none !important;
1509+
overflow: visible !important;
1510+
/* Anti-blur fixes */
1511+
shape-rendering: geometricPrecision !important;
1512+
image-rendering: -webkit-optimize-contrast !important;
1513+
transform: translateZ(0);
1514+
}
1515+
1516+
.markdown-body .math-code-block::-webkit-scrollbar,
1517+
.markdown-body .math-display::-webkit-scrollbar,
1518+
.markdown-body .math-inline::-webkit-scrollbar {
1519+
height: 4px;
1520+
}
1521+
1522+
.markdown-body .math-code-block::-webkit-scrollbar-track,
1523+
.markdown-body .math-display::-webkit-scrollbar-track,
1524+
.markdown-body .math-inline::-webkit-scrollbar-track {
1525+
background: transparent;
1526+
}
1527+
1528+
/* Show scrollbar thumb by default for visibility on mobile */
1529+
.markdown-body .math-code-block::-webkit-scrollbar-thumb,
1530+
.markdown-body .math-display::-webkit-scrollbar-thumb,
1531+
.markdown-body .math-inline::-webkit-scrollbar-thumb {
1532+
background-color: rgba(var(--text-secondary-rgb), 0.3);
1533+
border-radius: 10px;
1534+
}
1535+
1536+
/* Increase visibility on hover */
1537+
.markdown-body .math-code-block:hover::-webkit-scrollbar-thumb,
1538+
.markdown-body .math-display:hover::-webkit-scrollbar-thumb,
1539+
.markdown-body .math-inline:hover::-webkit-scrollbar-thumb,
1540+
.markdown-body .math-code-block:active::-webkit-scrollbar-thumb,
1541+
.markdown-body .math-display:active::-webkit-scrollbar-thumb,
1542+
.markdown-body .math-inline:active::-webkit-scrollbar-thumb {
1543+
background-color: rgba(var(--text-secondary-rgb), 0.8);
1544+
}
1545+
1546+
.markdown-body .math-code-block::-webkit-scrollbar-thumb:hover,
1547+
.markdown-body .math-display::-webkit-scrollbar-thumb:hover,
1548+
.markdown-body .math-inline::-webkit-scrollbar-thumb:hover {
1549+
background-color: rgba(var(--text-secondary-rgb), 1);
1550+
}
1551+
1552+
/* Firefox support */
1553+
.markdown-body .math-code-block,
1554+
.markdown-body .math-display,
1555+
.markdown-body .math-inline {
1556+
scrollbar-width: thin;
1557+
scrollbar-color: rgba(var(--text-secondary-rgb), 0.3) transparent;
1558+
}
1559+
1560+
.markdown-body .math-code-block:hover,
1561+
.markdown-body .math-display:hover,
1562+
.markdown-body .math-inline:hover,
1563+
.markdown-body .math-code-block:active,
1564+
.markdown-body .math-display:active,
1565+
.markdown-body .math-inline:active {
1566+
scrollbar-width: thin;
1567+
}

0 commit comments

Comments
 (0)