Browse Source

Merge pull request #825 from zauberzeug/blockquotes

#820 style blockquotes in markdown elements
Falko Schindler 2 years ago
parent
commit
26bd9c3fe6
2 changed files with 6 additions and 0 deletions
  1. 1 0
      nicegui/elements/markdown.py
  2. 5 0
      nicegui/static/nicegui.css

+ 1 - 0
nicegui/elements/markdown.py

@@ -24,6 +24,7 @@ class Markdown(ContentElement):
         """
         """
         self.extras = extras
         self.extras = extras
         super().__init__(tag='markdown', content=content)
         super().__init__(tag='markdown', content=content)
+        self._classes = ['nicegui-markdown']
         self._props['codehilite_css'] = HtmlFormatter(nobackground=True).get_style_defs('.codehilite')
         self._props['codehilite_css'] = HtmlFormatter(nobackground=True).get_style_defs('.codehilite')
 
 
     def on_content_change(self, content: str) -> None:
     def on_content_change(self, content: str) -> None:

+ 5 - 0
nicegui/static/nicegui.css

@@ -67,6 +67,11 @@
   opacity: 1 !important;
   opacity: 1 !important;
   cursor: text !important;
   cursor: text !important;
 }
 }
+.nicegui-markdown blockquote {
+  border-left: 0.25rem solid #8884;
+  padding: 1rem 1rem 0.5rem 1rem;
+  margin: 1rem 0;
+}
 
 
 #popup {
 #popup {
   position: fixed;
   position: fixed;