Skip to content

📝 Content

WYSIWYG (What You See Is What You Get) refers to content edited visually — like in Gutenberg, Sanity, or even custom textarea fields — and later rendered as HTML on the frontend.

The .c--content module provides a consistent and customizable styling system for rich text content.

This is especially useful when you’re working with WYSIWYG content. It ensures that headings, lists, images, links, and other elements display with clean, coherent, and accessible styles on the frontend.


This module is part of an internal Terra Package: terrahq-wysiwyg

You’ll find there:

  • The source code and SCSS mixins
  • The list of available content blocks
  • Instructions for installation and integration

The .c--content class is powered by two SCSS mixins:

  • make-content() – Applies the default structure and baseline styles
  • make-content-modifier() – Lets you customize individual blocks (e.g. paragraphs, quotes, buttons) per project

You can use this module in any context where user-generated content is inserted into your layout and needs to look polished and consistent.

<div class="c--content-a">
<!-- Editor content goes here -->
<p> Hello World </p>
<a href="https://terrahq.com/">Terra Web</a>
</div>
.c--content-a {
@include make-content();
@include make-content-modifier(
$headings-options: (...),
$image-options: (...),
...
);
}

All blocks are optional and fully customizable. You only uncomment the styles you need.

.c--content-a {
@include make-content();
@include make-content-modifier(
$headings-options: (
"h2": (
"margin-bottom": $measure * 3,
"padding-top": $measure * 5,
"className": f--font-a f--color-b,
),
"h3": (
"margin-bottom": $measure * 2,
"padding-top": $measure * 5,
"className": f--font-b f--color-c,
)
)
);
}
  • Use only the blocks your project needs — the mixins are modular.
  • You can also customize deeply nested elements (like captions, list artwork, or table cells) via nested option maps.
BlockPlatformsNotes
HeadingsWP & SanityFull control over margins, fonts, spacing
ImageWP & SanityIncludes caption styling
LinksWP & SanityCan be extended with g--link-*
ListsWP & SanityIncludes artwork and number variants
ParagraphsWP & SanityIncludes margin logic before lists
QuoteWP & Sanitycite only available in WP
FootnoteWP onlyCustom block for footnotes
HighlightedWP onlyHighlighted text component
ButtonWP onlyUses g--btn-* styling
ColumnsWP onlyIncludes responsive breakpoint control
SeparatorWP onlySupports width, color, and spacing
TableWP onlyFull header/body/caption styling
VideoWP onlyIncludes caption and spacing
UtilitiesWP onlyUtility options like spacing between aligned media & text
CustomWP & SanityAdd your own selector as needed