Robert Birming

Bear Blog text shorthands

The default Bear Blog theme keeps things plain, no built-in way to center a block, add some subtle text, or drop in a custom divider. A handful of small classes fill that gap.

Simply wrap your content in a div and add the class, no extra markup or thinking required. Mix and match, combine them, tweak the values, or use them as a starting point for your own styles.

Last updated 3 minutes ago.


Centered text

Centered text example

Markup

<div class="center">
Your content.
</div>

Styles

.center {
  text-align: center;
}

Subtle text

Subtle text example

Markup

<div class="meta">
Your content.
</div>

Styles

.meta {
  font-size: calc(var(--font-scale) * 0.85);
  color: color-mix(in srgb, var(--text-color), transparent 40%);
}

Pull quote

Pull quote example

Markup

<div class="pullquote">
Your content.
</div>

Styles

.pullquote {
  font-size: 1.35em;
  line-height: 1.4;
  text-align: center;
  padding-inline: 1em;
  font-style: italic;
}

Callout note

Callout note example

Markup

<div class="callout">
A quick note before you continue.
</div>

Styles

.callout {
  border: 1px dashed color-mix(in srgb, var(--text-color), transparent 50%);
  border-radius: 3px;
  padding: 8px 12px;
  font-size: small;
  text-align: center;
}

Dividers

Divider styles example

Markup

<div class="solid-divider"></div>
<div class="double-divider"></div>
<div class="symbol-divider">ʕ•ᴥ•ʔ</div>
<div class="short-divider"></div>
<div class="dots-divider"></div>

Styles

.solid-divider {
  height: 1px;
  margin-block: 1.5rem;
  background: color-mix(in srgb, var(--text-color), transparent 78%);
}

.double-divider {
  height: 5px;
  margin-block: 1.5rem;
  border-block-start: 1px solid color-mix(in srgb, var(--text-color), transparent 78%);
  border-block-end: 1px solid color-mix(in srgb, var(--text-color), transparent 78%);
}

.symbol-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block: 1.5rem;
  color: color-mix(in srgb, var(--text-color), transparent 40%);
}

.symbol-divider::before,
.symbol-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--text-color), transparent 78%);
}

.short-divider {
  width: 20rem;
  height: 1px;
  margin-block: 1.5rem;
  margin-inline: auto;
  background: color-mix(in srgb, var(--text-color), transparent 78%);
}

.dots-divider {
  text-align: center;
  margin-block: 1.5rem;
  color: color-mix(in srgb, var(--text-color), transparent 40%);
  letter-spacing: 0.35em;
}

.dots-divider::before {
  content: "• • •";
}

Combining styles example

Combined text styles example

Markup

<div class="center meta">
Your content.
</div>

Want more? Check out the full Bear Blog library.