Custom CSS Guide

This guide explains how to write custom CSS for the SwaggerHub Portal consumer interface, covering the selector API, property allowlist, dark mode, cascade behavior, and known limitations.

Overview

Portal admins can apply custom CSS to the consumer-facing portal from Settings → Appearance → Custom CSS.

CSS is written in the editor, validated server-side, and injected into every page of the consumer portal. Custom CSS can change colors, typography, borders, shadows, and spacing of named portal components. It cannot restructure layout, load external fonts directly, or target arbitrary DOM elements. The various sections of the guide are as follows:

Publication date: