# Is there a way to get Source Mode to not show styles?

**URL:** <https://forum.obsidian.md/t/is-there-a-way-to-get-source-mode-to-not-show-styles/46423>\
**Category:** Help\
**Tags:** ui-ux, custom-css\
**Created:** [October 28, 2022, 6:08pm UTC](https://forum.obsidian.md/t/is-there-a-way-to-get-source-mode-to-not-show-styles/46423 "2022-10-28T18:08:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerviscui](https://forum.obsidian.md/user_avatar/forum.obsidian.md/jerviscui/32/36195_2.png) [@jerviscui](https://forum.obsidian.md/u/jerviscui)\
**Post date:** [October 28, 2022, 6:08pm UTC](https://forum.obsidian.md/t/is-there-a-way-to-get-source-mode-to-not-show-styles/46423/1 "2022-10-28T18:08:57Z")

</div>

There is a problem with the style of the code block and the list together in Source Mode, the indentation is not aligned. And the block always comes with an indent style.

Is it possible to turn off styling in Source Mode? The existing styling issue is better than no styling and just displaying as text.

Does anyone else have this confusion?

---

<div class="post-metadata">

**Author:** ![jerviscui](https://forum.obsidian.md/user_avatar/forum.obsidian.md/jerviscui/32/36195_2.png) [@jerviscui](https://forum.obsidian.md/u/jerviscui)\
**Post date:** [October 29, 2022, 3:04am UTC](https://forum.obsidian.md/t/is-there-a-way-to-get-source-mode-to-not-show-styles/46423/2 "2022-10-29T03:04:15Z")

</div>

Use the ob default theme.

 ![image](https://forum.obsidian.md/uploads/default/original/3X/f/9/f9ceb751393d75040ead3094d1559e3090a0e52f.png)

The left side is source mode, the right side is reading view.

1. the indent lines don’t line up,
2. the red boxes are all at the same indent level, but the edit mode renders in a style that makes it impossible to write at all.

This is the effect of other editors, source mode without rendering styles is more suitable for editorial work,

 ![image](https://forum.obsidian.md/uploads/default/original/3X/b/6/b6c12d175ff6080e41d1ce54bc80a3051dcb2a09.png)

The line breaks in this code block are also confusing

 ![image](https://forum.obsidian.md/uploads/default/original/3X/3/2/32ed02e072fb5e5a9ec78eddd3749d6747d4d4db.png)

---

<div class="post-metadata">

**Author:** ![BarryPorter13](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@BarryPorter13](https://forum.obsidian.md/u/BarryPorter13)\
**Post date:** [October 29, 2022, 3:35pm UTC](https://forum.obsidian.md/t/is-there-a-way-to-get-source-mode-to-not-show-styles/46423/3 "2022-10-29T15:35:36Z")

</div>

What fonts are you using for Source Mode and reading view?

---

<div class="post-metadata">

**Author:** ![jerviscui](https://forum.obsidian.md/user_avatar/forum.obsidian.md/jerviscui/32/36195_2.png) [@jerviscui](https://forum.obsidian.md/u/jerviscui)\
**Post date:** [October 29, 2022, 4:22pm UTC](https://forum.obsidian.md/t/is-there-a-way-to-get-source-mode-to-not-show-styles/46423/4 "2022-10-29T16:22:30Z")

</div>

I think I solved the problem.  
Now I am using the Inconsolata font and using the following css.

```css
/* list Indent */
.mod-cm6 .HyperMD-list-line.cm-line {
    padding-top: var(--list-spacing);
    padding-bottom: var(--list-spacing);
    text-indent: 0 !important;
    padding-inline-start: 0 !important;
}

/* quote Indent */
.mod-cm6 .HyperMD-quote.cm-line {
    text-indent: 0 !important;
    padding-inline-start: 0 !important;
}

/* codeblock Indent */
.markdown-source-view.mod-cm6 .cm-line.HyperMD-codeblock {
    padding-left: 0;
    color: var(--code-normal);
}

/* all source mode font */
/* .markdown-source-view {
    font-family: var(--font-text);
    font-size: var(--font-text-size);
} */

/* codeblock font */
.cm-s-obsidian .HyperMD-codeblock {
    font-family: var(--font-monospace);
    font-size: var(--font-text-size);
}

/* inline-code font */
.cm-s-obsidian span.cm-inline-code {
    color: var(--code-normal);
    font-size: var(--font-text-size);
    background-color: var(--code-background);
    vertical-align: baseline;
}

/* ident line position */
.markdown-source-view.mod-cm6 .cm-indent::before {
    content: "\200B";
    display: block;
    width: 0;
    border-right: var(--indentation-guide-width) solid
        var(--indentation-guide-color);
    color: transparent;
    position: absolute;
    top: 0;
    bottom: 0;
    transform: none;
}

```

The indentation of the list and code block is now correct.

 ![image](https://forum.obsidian.md/uploads/default/original/3X/3/7/37f88d07ae2fb9f4d1c50a862fa8b98fe584fafc.png)

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [November 5, 2022, 4:23pm UTC](https://forum.obsidian.md/t/is-there-a-way-to-get-source-mode-to-not-show-styles/46423/5 "2022-11-05T16:23:14Z")

</div>

Closed on November 5, 2022, 4:23pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
