CSS in Markdown_card content

Hi
How can i import a CSS into a HTML content of a markdown_card?

Hi @rmfjd78,

this is not really supported as one of the main Wave goals is to allow building UI without any HTML/CSS/JS knowledge. There are a few ways around this though (all of these are discouraged):

  1. Using <style> tag.
  2. Using inline CSS.

Minimal example:

from h2o_wave import site, ui

page = site['/demo']

sample_markdown = '''=
<style>
.my-class {
  color: red
}
</style>

<h1 class="my-class">This title is red using style element.</h1>
<h1 style="color: blue">This title is blue using inline CSS</h1>
'''

page['example'] = ui.markdown_card(
    box='1 1 3 3',
    title='So you want to use custom CSS',
    content=sample_markdown,
)
page.save()