fix: allow markdown under custom renderer (#161)

* fix: allow markdown under custom renderer

* Create three-bags-flow.md
This commit is contained in:
Thuc Pham
2025-07-09 09:03:11 +07:00
committed by GitHub
parent 316576d666
commit 8bc761b522
2 changed files with 137 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@llamaindex/chat-ui': patch
---
fix: allow markdown under custom renderer
+132
View File
@@ -133,6 +133,138 @@
font-weight: 500;
}
/*
* High priority selectors for nested markdown components inside custom-renderer
* These override the :not(.custom-renderer *) exclusions above
*/
.custom-markdown:has(.custom-renderer) .custom-markdown ul {
list-style-type: disc;
margin-left: 20px;
margin-top: 20px;
margin-bottom: 20px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown ol {
list-style-type: decimal;
margin-left: 20px;
margin-top: 20px;
margin-bottom: 20px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown li {
margin-bottom: 5px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown ol ol {
list-style: lower-alpha;
}
.custom-markdown:has(.custom-renderer) .custom-markdown ul ul,
.custom-markdown:has(.custom-renderer) .custom-markdown ol ol {
margin-left: 20px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown img {
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
margin: 10px 0;
}
.custom-markdown:has(.custom-renderer) .custom-markdown a {
text-decoration: underline;
color: #007bff;
}
.custom-markdown:has(.custom-renderer) .custom-markdown h1,
.custom-markdown:has(.custom-renderer) .custom-markdown h2,
.custom-markdown:has(.custom-renderer) .custom-markdown h3,
.custom-markdown:has(.custom-renderer) .custom-markdown h4,
.custom-markdown:has(.custom-renderer) .custom-markdown h5,
.custom-markdown:has(.custom-renderer) .custom-markdown h6 {
font-weight: bold;
margin-bottom: 20px;
margin-top: 20px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown h6 {
font-size: 16px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown h5 {
font-size: 18px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown h4 {
font-size: 20px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown h3 {
font-size: 22px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown h2 {
font-size: 24px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown h1 {
font-size: 26px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown hr {
border: 0;
border-top: 1px solid #e1e4e8;
margin: 20px 0;
}
.custom-markdown:has(.custom-renderer) .custom-markdown table {
width: 100%;
margin: 20px 0;
overflow-x: auto;
display: block;
border-collapse: collapse;
font-size: 14px;
}
.custom-markdown:has(.custom-renderer) .custom-markdown table caption {
margin-top: 16px;
font-size: 14px;
color: #666;
text-align: left;
}
.custom-markdown:has(.custom-renderer) .custom-markdown thead {
border-bottom: 1px solid #e1e4e8;
}
.custom-markdown:has(.custom-renderer) .custom-markdown th {
height: 48px;
padding: 16px;
text-align: left;
vertical-align: middle;
font-weight: 500;
color: #666;
}
.custom-markdown:has(.custom-renderer) .custom-markdown td {
padding: 16px;
vertical-align: middle;
border-bottom: 1px solid #e1e4e8;
}
.custom-markdown:has(.custom-renderer) .custom-markdown tr {
transition: background-color 0.2s;
}
.custom-markdown:has(.custom-renderer) .custom-markdown tr:hover {
background-color: rgba(0, 0, 0, 0.05);
}
.custom-markdown:has(.custom-renderer) .custom-markdown tfoot {
border-top: 1px solid #e1e4e8;
background-color: rgba(0, 0, 0, 0.03);
font-weight: 500;
}
/*
* Reset CSS for inline components under custom-renderer class
*/