grimbough / msmbstyle

Tufte inspired bookdown template
https://www-huber.embl.de/users/msmith/msmbstyle/
59 stars 17 forks source link

Header and title section colours #24

Open lgatto opened 4 years ago

lgatto commented 4 years ago

I was wondering if you were interested is setting the header and title section colour (#1881c2) as a global variable? This would allow a user to relatively simply customise it for different books/projects.

I have experimented with:

:root {
  --main-bg-color: #2aa0ea;
}

and, in msmb.css

h1 {
  color: var(--main-bg-color);
  width: 55%;
  border-bottom-color: var(--main-bg-color);
  border-bottom-style: solid;
  padding-bottom: 0.5rem;
}

h2 {
  color: var(--main-bg-color);
  border-bottom-color: var(--main-bg-color);
  border-bottom-style: solid;
  width: 55%;
  padding-bottom: 0.5rem;
  margin-top: 3em;
  font-weight: bold;
}

h3 {
  color: var(--main-bg-color);
  font-size: 1.5rem;
}
[...]