# 👅 Markdown Flavors

**URL:** https://meta.discourse.org/t/markdown-flavors/208844
**Category:** Theme component
**Created:** [November 11, 2021, 12:21am UTC](https://meta.discourse.org/t/markdown-flavors/208844 "2021-11-11T00:21:09Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [November 11, 2021, 12:21am UTC](https://meta.discourse.org/t/markdown-flavors/208844/1 "2021-11-11T00:21:10Z")

</div>

![banner](https://global.discourse-cdn.com/meta/original/3X/6/7/6765fcdf4f1239341e613154e8f9c7af264ff999.png)

## 🔍 Overview

This theme component allows you to select a flavor for which markdown style you want outputted when making posts. Each markdown ‘flavor’ is inspired by a format of markdown commonly used on the web.

## ❓ Why might you want this

This can be installed purely for stylistic purposes or to solve issues such as mentioned [here](https://meta.discourse.org/t/inline-code-dificult-to-identify/208776).

### 📝 Examples

 ![examples](https://global.discourse-cdn.com/meta/original/3X/c/b/cb7374a606a66c5b8e489afed76d93ed49dc7836.png)

### 🔗 Quick Links

| | | |
| --- | --- | --- |
| [🐙 Get the code](https://github.com/keegangeorge/discourse-markdown-flavors) | | |
| [❓ Installation Guide](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) | | |
| [🔍 Preview](https://try.thepavilion.io/t/markdown-examples/1612) | | |
| [🗞 Documentation](https://thepavilion.io/t/markdown-flavors/4947) | | |

Install Theme Component

---

<div class="post-metadata">

### Author: ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)
#### Post date: [November 12, 2021, 7:11am UTC](https://meta.discourse.org/t/markdown-flavors/208844/2 "2021-11-12T07:11:17Z")

</div>

Hi, thank you for this component!

Just tested it in Windows 11 with dark theme. Discourse with default light theme.

Everything works as described but:

1. flavor=GitHub makes the table totally black
2. flavor=Gitlab makes the header black
3. flavor=Bitbucket work ok

GitHub:

 ![изображение](https://global.discourse-cdn.com/meta/original/3X/5/9/59aafb43635f7a7d9af3d79b924eb896cac0987e.png)

Gitlab:

 ![изображение](https://global.discourse-cdn.com/meta/original/3X/2/c/2c0e0ce7eb45e0c228dfb65e9863030bb7f7567f.png)

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [November 16, 2021, 7:37pm UTC](https://meta.discourse.org/t/markdown-flavors/208844/3 "2021-11-16T19:37:28Z")

</div>

Hey @Ivan_Rapekas,

Thanks for letting me know about this issue. I had some custom color variables that auto change based on the user’s system dark/light mode preference. However, if you don’t have the auto-dark mode switching on your Discourse, this issue occurs. Especially if you have a Light theme on Discourse but your system is set to Dark mode.

As a quick fix for this, [I’ve added a setting that toggles the auto dark theme switching](https://github.com/keegangeorge/discourse-markdown-flavors/commit/247eb7757617a6598118546e8d4c5d64c2af688f). If you uncheck this in your theme settings this issue should be resolved for you.

 ![Screen Shot 2021-11-16 at 11.35.21 AM](https://global.discourse-cdn.com/meta/original/3X/f/7/f766cb1c95e6a332826e2adc24eb406424b6e2f3.png)

---

<div class="post-metadata">

### Author: ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)
#### Post date: [November 17, 2021, 4:57am UTC](https://meta.discourse.org/t/markdown-flavors/208844/4 "2021-11-17T04:57:20Z")

</div>

Hi @keegan !

Thank you for the reply and quick fix! This helped me.

Unfortunately, I have to notice that at all this component changes the font:

a) component disabled:

 ![изображение](https://global.discourse-cdn.com/meta/original/3X/1/6/16bc825cdbb937373417b1eb78e0c0838ea4050c.png)

b) component enabled:

 ![изображение](https://global.discourse-cdn.com/meta/original/3X/4/8/48a6282af8b8e872208e712a321a9d1977e3ddca.png)

Also it changes `<kbd> </kbd>` in a table cell (the scale is the same):  
a) original:  
 ![Screenshot_4](https://global.discourse-cdn.com/meta/original/3X/4/3/436e37f6614af564f69c81260ae81fec576712f9.png)

b) with component:  
 ![Screenshot_3](https://global.discourse-cdn.com/meta/original/3X/2/8/288e1dcbadd54b52ed73a049d569f55cd8ae679c.png)

This is just a notice, no need to fix it, I think 🙂 .

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [November 17, 2021, 5:42am UTC](https://meta.discourse.org/t/markdown-flavors/208844/5 "2021-11-17T05:42:30Z")

</div>

@Ivan_Rapekas Yeah that’s correct. I tried to imitate the font choices used in markdown by each respective flavor (i.e [GitHub.com](http://GitHub.com)’s markdown font is used when you select GitHub flavor)

---

<div class="post-metadata">

### Author: ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)
#### Post date: [November 17, 2021, 6:05am UTC](https://meta.discourse.org/t/markdown-flavors/208844/6 "2021-11-17T06:05:41Z")

</div>

Aah, understood. Really, fonts are similar to Gitlab/GitHub. Thanks for explanation! Brilliant idea, this is more than expected from “just a theme component” 👏

---

<div class="post-metadata">

### Author: ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)
#### Post date: [December 5, 2021, 2:44pm UTC](https://meta.discourse.org/t/markdown-flavors/208844/7 "2021-12-05T14:44:13Z")

</div>

> [@Ivan\_Rapekas](#):
>
> a) original:  
> ![Screenshot_4](https://global.discourse-cdn.com/meta/original/3X/4/3/436e37f6614af564f69c81260ae81fec576712f9.png)
> 
> b) with component:  
> ![Screenshot_3](https://global.discourse-cdn.com/meta/original/3X/2/8/288e1dcbadd54b52ed73a049d569f55cd8ae679c.png)

Finally I applied original code block formatting over Gitlab layout 🙂 (works on default theme):

`/admin/customize/themes/1/common/scss/edit`

```css
// Original <kbd> over Gitlab theme component

.cooked kbd {
    align-items: center;
    border: 1px solid var(--primary-low-mid);
    background: var(--primary-very-low);
    border-bottom-width: 2px;
    border-radius: 3px;
    box-sizing: border-box;
    color: var(--primary);
    display: inline-flex;
    font-size: var(--font-down-1);
    justify-content: center;
    line-height: var(--line-height-large);
    margin: 0 0.15em;
    min-width: 24px;
    padding: 0.15em 0.6em;
}

```

This makes: ![Screenshot_4](https://global.discourse-cdn.com/meta/original/3X/4/3/436e37f6614af564f69c81260ae81fec576712f9.png)

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [October 6, 2024, 6:25pm UTC](https://meta.discourse.org/t/markdown-flavors/208844/8 "2024-10-06T18:25:30Z")

</div>

Hi I was wondering if this component will be updated to use color schemas? Ie primary, secondary etc..

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [October 7, 2024, 6:23pm UTC](https://meta.discourse.org/t/markdown-flavors/208844/9 "2024-10-07T18:23:19Z")

</div>

I haven’t had time to update this, but I will try to fit some time in sometime soon.

In the meantime perhaps this #official component might suit your needs?

> [@Customized Inline Codeblocks](https://meta.discourse.org/t/customized-inline-codeblocks/229452):
>
> discourse2Summary Customized Inline Codeblocks allows you to change the styling of the inline codeblocks to add more visual separation between the code and other elements.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/customized-inline-codeblocks)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-inline-codeblock-styles](https://github.com/discourse/discourse-inline-codeblock-styles)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Features With component: …

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [October 7, 2024, 6:34pm UTC](https://meta.discourse.org/t/markdown-flavors/208844/10 "2024-10-07T18:34:29Z")

</div>

Yeah that one is cool for sure. Was more looking at the tables your component here enhances table readability vs core. By using a more tradition table layout with vertical lines separators.

I appreciate how big the team workloads must be. No hurry, just though would inquire as only just recently found your TC. 😉
