-
Notifications
You must be signed in to change notification settings - Fork 184
Unexpected Markdown Rendering Differences in Nested Components #905
Copy link
Copy link
Closed
Description
Issue Description
I've encountered an unexpected behavior where identical Markdown content renders differently depending on its location within components. The same Markdown text appears differently when rendered directly versus when nested inside a Card component.
Reproduction Steps
- Create two identical Markdown components with the same content and style
- Render one directly and one inside a Card component
- Observe the different rendering results
Code Example
class ThemeStyles:
LAYOUT = {
"container": {
"width": "100%"
},
"section_title": {
"margin-bottom": "-4px",
"padding": "0",
"background": "pink"
},
}
# Direct rendering - renders as expected
solara.Markdown("## Title", style=ThemeStyles.LAYOUT["section_title"])
with solara.Card(style={'width': '100%', 'border-radius': '12px', 'padding': '0', 'cursor': 'pointer', 'position': 'relative', 'transition': 'all 0.3s ease'}):
solara.Markdown("## some word"])
# Inside SelectionList component - renders same
@solara.component
def SelectionList(items, ...):
solara.Markdown(f"## {title}", style=ThemeStyles.LAYOUT["section_title"])
# Inside SelectionList component - renders differently
@solara.component
def SelectionList(items, ...):
solara.Markdown(f"## {title}", style=ThemeStyles.LAYOUT["section_title"])
with solara.Card(style={'width': '100%', 'border-radius': '12px', 'padding': '0', 'cursor': 'pointer', 'position': 'relative', 'transition': 'all 0.3s ease'}):
solara.Markdown("## some word"])Expected Behavior
those all become the same
Current Behavior
Specifications
- Solara Version: 1.40.0
- Platform: Windows
- Affected Python Versions: 3.10.14
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
