Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom callouts (and use CSS more) #5

Open
rufuspollock opened this issue Nov 5, 2022 · 0 comments
Open

Support custom callouts (and use CSS more) #5

rufuspollock opened this issue Nov 5, 2022 · 0 comments

Comments

@rufuspollock
Copy link
Contributor

rufuspollock commented Nov 5, 2022

Suggest that:

> [!xyz]
> Hello

Render as a callout with type (css class) xyz and title Xyz.

To support this suggest that rendering of callout change from:

<div>
  <style>...</style>
  <blockquote class="callout">
    <div class="callout-title">
      <span>
        <svg>...</svg>
      </span>
      <strong>Tip</strong>
    </div>
    <div class="callout-content">
      <p>hello callout</p>
    </div>
  </blockquote>
</div>

to the following where we use more "semantic" html. This way it is easier to apply custom styling for custom callouts.

<div>
  <style>...</style>
  <blockquote class="callout callout-tip">
    <div class="callout-title">
      <span class=callout-icon">
        <svg>...</svg>
      </span>
      <span class="callout-title-text">Tip</span>
    </div>
    <div class="callout-content">
      <p>hello callout</p>
    </div>
  </blockquote>
</div>

Also suggest the icons are applied in css to the span callout-icon rather than being inlined. Or, at the very, least for unknown types we skip the svg and leave it empty so user can fill it in with css.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant