Overview
ThecustomCSS 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 acustomCSS 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 forclass attributes beginning with mantine-.
Common examples:
What Is Allowed
All standard CSS property-value pairs are permitted unless the value contains a resource-loading function (see below).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
ThecustomCSS 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
Becauseurl() 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.
fontUrl is validated before use. Only URLs from the following origins are accepted; all others are silently ignored:
https://fonts.googleapis.comhttps://fonts.bunny.net