Can I change the background color for the "quote", ''note", "important" etc blocks?

I am trying to emphasize some text using some of the blocks that are accessed with “<” and start like this “#+BEGIN_QUOTE” (for example). It has a gray background. I’d like it to have a light blue background.

Is there a way to change it?

Thanks.

[edit] I installed the Awesome Styler plugin and that helps a bit - only on QUOTE. Still looking for more non-plugin ideas.

Should be possible by adding to file custom.css something like these:

blockquote {
  background-color: lightblue;
}

.admonitionblock.caution {
  background-color: orange;
}

.admonitionblock.important {
  background-color: red;
}

.admonitionblock.note {
  background-color: blue;
}

.admonitionblock.tip {
  background-color: blue;
}

.admonitionblock.warning {
  background-color: orange;
}
4 Likes

Why the font-size property dont work

Per this example, font-size needs .text-lg

1 Like

Sharing my custom css for admonitions blocks

/* General blockquote styling with more transparent color */
blockquote {
  background-color: rgba(50, 80, 120, 0.15); /* Softer, more transparent midnight blue */
  border-left: 3px solid rgba(50, 80, 120, 0.4); /* More transparent border */
  padding: 1em;
  margin: 1em 0;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Base styling for all admonition blocks */
.admonitionblock {
  width: 100%;
  max-width: 100%;
  padding: 1em;
  margin: 1em 0;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1em;
}

/* Specific types with more transparent backgrounds */
.admonitionblock.caution {
  background-color: rgba(180, 100, 30, 0.15); /* More transparent warm amber */
  border-left: 3px solid rgba(180, 100, 30, 0.4);
}

.admonitionblock.important {
  background-color: rgba(180, 40, 40, 0.15); /* More transparent brighter red */
  border-left: 3px solid rgba(180, 40, 40, 0.4);
}

.admonitionblock.note {
  background-color: rgba(70, 50, 150, 0.15); /* More transparent deep indigo */
  border-left: 3px solid rgba(70, 50, 150, 0.4);
}

.admonitionblock.tip {
  background-color: rgba(40, 100, 60, 0.15); /* More transparent forest green */
  border-left: 3px solid rgba(40, 100, 60, 0.4);
}

.admonitionblock.warning {
  background-color: rgba(100, 30, 30, 0.15); /* More transparent deeper brownish-red */
  border-left: 3px solid rgba(100, 30, 30, 0.4);
}

/* Pinned with more transparent muted gold */
.admonitionblock.pinned {
  background-color: rgba(150, 120, 50, 0.15); /* More transparent subtle highlight */
  border-left: 3px solid rgba(150, 120, 50, 0.4);
}

/* Font size adjustments (kept as-is) */
/*.admonitionblock.important .text-lg,
.admonitionblock.warning .text-lg {
  font-size: 22px;
  font-weight: bold;
} */

/* Icon sizing */
.admonitionblock .admonition-icon svg {
  width: 24px;
  height: 24px;
}

/* Text wrapping */
.admonitionblock .ml-4 {
  flex: 1;
  word-break: break-word;
}
1 Like