# Documenter colors for backticked code

**URL:** <https://discourse.julialang.org/t/documenter-colors-for-backticked-code/32073>\
**Category:** General Usage\
**Tags:** documenter\
**Created:** [December 9, 2019, 9:56pm UTC](https://discourse.julialang.org/t/documenter-colors-for-backticked-code/32073 "2019-12-09T21:56:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jarl/32/4365_2.png) [@jarl](https://discourse.julialang.org/u/jarl)\
**Post date:** [December 9, 2019, 9:56pm UTC](https://discourse.julialang.org/t/documenter-colors-for-backticked-code/32073/1 "2019-12-09T21:56:50Z")

</div>

After an update to the newest version of Documenter.jl some things changed, most of which are positive changes. The colors of backticked code (e.g. `a_typical_variable`) has changed. It is now foreground red, and used to be only foreground black (and bg gray). Is there a way to change these colors?

I try to write the documentation in way that directs the readers attention to what I think is important, and the change from gray background to red foreground changes where the readers attention ends up. In particular in documentation with a lot of backticked code, e.g.:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/d/adf9ebede6e8fdde2810499fac59424a10131878.png)

---

<div class="post-metadata">

**Author:** ![findmyway](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/findmyway/32/4946_2.png) [@findmyway](https://discourse.julialang.org/u/findmyway)\
**Post date:** [December 10, 2019, 2:04am UTC](https://discourse.julialang.org/t/documenter-colors-for-backticked-code/32073/2 "2019-12-10T02:04:24Z")

</div>

You can write your own rules in a `custom.css` file and enable it like this:

> [@Resizing images in docs](https://discourse.julialang.org/t/resizing-images-in-docs/21721/8):
>
> You also have to use it, eg You can use a browser to debug this. Eg in Firefox, Ctrl-U can be used to view the page source (to see if the relevant CSS was included), and Q to inspect styling.

---

<div class="post-metadata">

**Author:** ![jarl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jarl/32/4365_2.png) [@jarl](https://discourse.julialang.org/u/jarl)\
**Post date:** [December 10, 2019, 3:17am UTC](https://discourse.julialang.org/t/documenter-colors-for-backticked-code/32073/3 "2019-12-10T03:17:22Z")

</div>

Thanks. I was hoping for a higher-level solution. A custom css-file seems error prone, e.g. in the next release of documenter. To be a bit more honest, I think this change of color is not a good idea, and I think other package maintainers would agree. I would be okay if I could add a flag somewhere. I do understand that one cannot expect to get a flag for every “old behavior”. Recommending a lot of package maintainers to hack css-files is like asking for trouble. It seems julialang’s main pages use more or less the default Documenter setting. If the red colors for backticked code are adapted there, I will stop complaining, assume my opinion is an outlier, and just do the css-solution.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 10, 2019, 6:34am UTC](https://discourse.julialang.org/t/documenter-colors-for-backticked-code/32073/4 "2019-12-10T06:34:06Z")

</div>

> [@jarl](#):
>
> A custom css-file seems error prone, e.g. in the next release of documenter.

Design choices are always somewhat subjective. I think that CSS is the best way to keep these things customizable. You should always [pin to a specific version](https://github.com/JuliaDocs/Documenter.jl/blob/9a7af14adfd8e8da7bf12bcaca254fed210a7ed8/docs/Project.toml#L2) in any case.

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [December 10, 2019, 7:34am UTC](https://discourse.julialang.org/t/documenter-colors-for-backticked-code/32073/5 "2019-12-10T07:34:59Z")

</div>

> [@jarl](#):
>
> It seems julialang’s main pages use more or less the default Documenter setting. If the red colors for backticked code are adapted there, I will stop complaining

The `1.4-dev` documentation already has the new layout and colors: [https://docs.julialang.org/en/latest/stdlib/Libdl/](https://docs.julialang.org/en/latest/stdlib/Libdl/)

---

<div class="post-metadata">

**Author:** ![jarl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jarl/32/4365_2.png) [@jarl](https://discourse.julialang.org/u/jarl)\
**Post date:** [December 10, 2019, 5:17pm UTC](https://discourse.julialang.org/t/documenter-colors-for-backticked-code/32073/6 "2019-12-10T17:17:01Z")

</div>

The “solution” (if this should be seen as a problem) seems to be to add a custom css-file as @findmyway pointed out like given here [Resizing images in docs - #8 by Tamas\_Papp](https://discourse.julialang.org/t/resizing-images-in-docs/21721/8). The entry that needs to be modified is in `documenter-light.css`:

```css
code {
  background-color: rgba(0, 0, 0, 0.05);
  color: #da0b00; /* would need to be removed */
  font-size: 0.875em;
  font-weight: normal;
  padding: 0.1em; }

```

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [December 10, 2019, 8:41pm UTC](https://discourse.julialang.org/t/documenter-colors-for-backticked-code/32073/7 "2019-12-10T20:41:33Z")

</div>

@jarl It looks like you are not the only one to think this choice of color is distracting, reading:

[https://github.com/JuliaDocs/Documenter.jl/issues/1091](https://github.com/JuliaDocs/Documenter.jl/issues/1091)

While customizability is great, improving the default style also makes sense. Maybe open an issue in the GitHub repos? It would be nice if you can convince Documenter.jl devs. I also think emphasizing inline code too much does not make sense.
