Developers

Custom CSS

Use the public theme contract, maintain compatibility, and recover a broken interface.

Open Settings → Developer → Custom CSS. This feature is strictly for appearance: it does not add server capabilities and does not change permissions.

Use the public variables --nd-*. Internal classes .nd-* may change and do not constitute a stable contract.

The default Calme design declares tokens on body, including theme and light-mode scopes. These examples target body[data-design="calme"] and use !important to override both theme declarations and saved inline Appearance values. Remove the override to let Appearance control that value again. Calme keeps card shadows flat even when a shadow token changes.

body[data-design="calme"] {
  --nd-accent: #7c3aed !important;
  --nd-accent-glow: rgba(124, 58, 237, 0.18) !important;
  --nd-card-radius: 16px !important;
  --nd-card-border: rgba(124, 58, 237, 0.24) !important;
}

Colors and surfaces

VariablesUsage
--nd-bg, --nd-bg-surface, --nd-bg-gradientGlobal background
--nd-card-bg-rgb, --nd-card-bg-opacity, --nd-card-bgCard surfaces
--nd-subcard-bg, --nd-card-border, --nd-card-hover-border, --nd-card-shadowNested cards, borders, and shadows
--nd-text, --nd-text-muted, --nd-text-dimmedTypographic hierarchy
--nd-accent, --nd-accent-glow, --nd-accent-dimAccent color
--nd-green, --nd-yellow, --nd-orange, --nd-redStates
--nd-blue, --nd-purpleComplementary colors
--nd-progress-bg, --nd-progress-fillProgress indicators
--nd-icon-bg, --nd-icon-borderIcon containers

Shapes and motion

--nd-card-radius controls corners and --nd-transition the transition duration. Use Settings → Appearance → Surface blur for current surface blur: it sets --nd-surface-blur and enables data-blur="on" on the body. The older --nd-blur variable still has legacy consumers but does not enable current surface blur.

Mobile and accessibility

body[data-design="calme"] {
  --nd-card-radius: 18px !important;
}

@media (max-width: 700px) {
  body[data-design="calme"] {
    --nd-card-radius: 10px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-design="calme"] {
    --nd-transition: 0ms !important;
  }
}

Maintain sufficient contrast, visible focus indicators, and comfortable touch target sizes. Test in light mode, dark mode, mobile, tablet, and desktop.

Safe recovery

If the CSS hides the navigation, open:

https://your-nasdash.example/?safe-css=1

The parameter disables the saved CSS for this load without deleting it. Open the settings, fix or reset the CSS, then reload the normal URL.

Security limits

  • Maximum size: 256 KiB;
  • Scripts, dangerous protocols, HTML/style breakouts, expression(), historical behaviors, and remote @import are neutralized;
  • CSS comments are removed;
  • An ordinary external url(...) can contact a third-party server and reveal the visitor's IP address.

Sanitization is a complementary protection, not a reason to grant administration privileges to an untrusted person.

Saved CSS belongs to config.json and is included in a complete backup. Save a known working backup before major changes.