Skip to main content

Overview

The customCSS field in window.theAnimeCommunityConfig lets you inject CSS rules that are applied inside the embedded comment section iframe. This allows you to change fonts, spacing, border radii, and other visual properties beyond what the colorScheme options expose.
For simple color changes, the colorScheme options are the easiest path and require no knowledge of internal class names. Use customCSS when you need finer-grained control that colorScheme does not cover.

Basic Usage

Add a customCSS string to your configuration object before loading the embed script:

How to Find Class Names

The comment section is built with Mantine. Mantine components expose stable, predictable class names on their root elements. Open your browser’s developer tools, click Inspect on any part of the embedded comment section, and look for class attributes beginning with mantine-. Common examples:
Mantine class names are stable within a major version but may change between major version upgrades. If your custom CSS stops working after an update, re-inspect the elements to find the new class names.

What Is Allowed

All standard CSS property-value pairs are permitted unless the value contains a resource-loading function (see below).
Hiding/obscuring the “The Anime Community” logo at the bottom right of the comment section is not allowed. Doing so will have your domain blocked.

What Is Blocked

The following are silently stripped from your CSS before it is applied. Rules or declarations that are blocked are simply ignored; the rest of your CSS is still applied normally.

Size Limit

The customCSS string is limited to 50,000 characters (approximately 50 KB). Strings exceeding this limit are silently discarded in their entirety; no partial CSS is applied.

Practical Examples

Change the font

System fonts and generic font families work without needing to load any external files:

Adjust comment card appearance

Increase base font size

Reduce spacing between comments

Responsive tweaks

Combined with colorScheme

customCSS and colorScheme can be used together. colorScheme handles the high-level color tokens and customCSS handles everything else:

Loading a Custom Font

Because url() and @import are blocked in customCSS, you cannot load external fonts directly from a CSS string. Instead, use the fontUrl field to load a font from Google Fonts or Bunny Fonts.
The fontUrl is validated before use. Only URLs from the following origins are accepted; all others are silently ignored:
  • https://fonts.googleapis.com
  • https://fonts.bunny.net

What customCSS Cannot Do