Skip to main content

Nextcloud CSS Variable to NL Design Token Mappings

This document provides a complete mapping between every Nextcloud CSS custom property and its --nldesign-* equivalent. Variables are organized by category.

Legend:

  • Mapped = Nextcloud variable is overridden with an --nldesign-* token
  • Unmapped = No appropriate NL Design equivalent; variable is commented out in overrides.css
  • Intentionally not overridden = Variable exists but is left to Nextcloud's control

Primary Colors

Nextcloud VariableNL Design MappingCategoryNotes
--color-primary--nldesign-color-primaryPrimaryMain brand color
--color-primary-text--nldesign-color-primary-textPrimaryText on primary background
--color-primary-hover--nldesign-color-primary-hoverPrimaryPrimary hover state
--color-primary-element--nldesign-color-primaryPrimaryInteractive element primary color
--color-primary-element-hover--nldesign-color-primary-hoverPrimaryInteractive element hover
--color-primary-element-text--nldesign-color-primary-textPrimaryText on primary element
--color-primary-element-text-darkunmappedPrimaryDark variant of primary element text; no NL Design equivalent
--color-primary-light--nldesign-color-primary-lightPrimaryLight variant of primary
--color-primary-light-hover--nldesign-color-primary-light-hoverPrimaryLight primary hover
--color-primary-light-text--nldesign-color-primaryPrimaryText on light primary; uses brand color
--color-primary-element-light--nldesign-color-primary-lightPrimaryDeprecated alias for primary-light
--color-primary-element-light-text--nldesign-color-primaryPrimaryDeprecated alias
--color-primary-element-light-hover--nldesign-color-primary-light-hoverPrimaryDeprecated alias

Main Background

Nextcloud VariableNL Design MappingCategoryNotes
--color-main-backgroundintentionally not overriddenBackgroundCore page background; overriding breaks dark mode and accessibility themes
--color-main-background-rgbintentionally not overriddenBackgroundRGB variant for rgba() usage; depends on --color-main-background
--color-main-background-translucentintentionally not overriddenBackgroundTranslucent variant; depends on --color-main-background-rgb
--color-main-background-blurintentionally not overriddenBackgroundBlur variant; depends on --color-main-background-rgb
--color-background-plainintentionally not overriddenBackgroundAdmin/user configured background; should respect user settings
--color-background-plain-textintentionally not overriddenBackgroundText on plain background; auto-calculated by Nextcloud

Background States

Nextcloud VariableNL Design MappingCategoryNotes
--color-background-hover--nldesign-color-background-hoverBackground StateHover state background
--color-background-dark--nldesign-color-background-darkBackground StateDarker background variant
--color-background-darker--nldesign-color-background-darkerBackground StateDarkest background variant

Placeholder Colors

Nextcloud VariableNL Design MappingCategoryNotes
--color-placeholder-light--nldesign-color-placeholder-lightPlaceholderLight placeholder (e.g., empty states)
--color-placeholder-dark--nldesign-color-placeholder-darkPlaceholderDark placeholder

Text Colors

Nextcloud VariableNL Design MappingCategoryNotes
--color-main-text--nldesign-color-textTextMain body text color
--color-text-maxcontrast--nldesign-color-text-mutedTextMuted/secondary text
--color-text-maxcontrast-defaultunmappedTextDefault maxcontrast; auto-calculated by Nextcloud per theme
--color-text-maxcontrast-background-blurunmappedTextBlur-adjusted maxcontrast; Nextcloud calculates per background
--color-text-light--nldesign-color-text-lightTextLight-colored text (deprecated in NC)
--color-text-lighter--nldesign-color-text-mutedTextLighter text (deprecated alias)
--color-text-error--nldesign-color-errorTextError message text
--color-text-success--nldesign-color-successTextSuccess message text
--color-text-warning--nldesign-color-warningTextWarning message text

Status: Error

Nextcloud VariableNL Design MappingCategoryNotes
--color-error--nldesign-color-errorStatusError background/accent
--color-error-hover--nldesign-color-error-hoverStatusError hover state
--color-error-textunmappedStatusError text color; NC auto-calculates for contrast
--color-error-rgb--nldesign-color-error-rgbStatusDeprecated; RGB for rgba()
--color-element-error--nldesign-color-errorStatusError element accent
--color-border-error--nldesign-color-errorStatusError border; uses error color

Status: Warning

Nextcloud VariableNL Design MappingCategoryNotes
--color-warning--nldesign-color-warningStatusWarning background/accent
--color-warning-hoverunmappedStatusWarning hover; no NL Design equivalent
--color-warning-textunmappedStatusWarning text; NC auto-calculates for contrast
--color-warning-rgb--nldesign-color-warning-rgbStatusDeprecated; RGB for rgba()
--color-element-warning--nldesign-color-warningStatusWarning element accent

Status: Success

Nextcloud VariableNL Design MappingCategoryNotes
--color-success--nldesign-color-successStatusSuccess background/accent
--color-success-hoverunmappedStatusSuccess hover; no NL Design equivalent
--color-success-textunmappedStatusSuccess text; NC auto-calculates for contrast
--color-success-rgb--nldesign-color-success-rgbStatusDeprecated; RGB for rgba()
--color-element-success--nldesign-color-successStatusSuccess element accent
--color-border-success--nldesign-color-successStatusSuccess border; uses success color

Status: Info

Nextcloud VariableNL Design MappingCategoryNotes
--color-info--nldesign-color-infoStatusInfo background/accent
--color-info-hoverunmappedStatusInfo hover; no NL Design equivalent
--color-info-textunmappedStatusInfo text; NC auto-calculates for contrast
--color-info-rgbunmappedStatusDeprecated; RGB for rgba()
--color-element-info--nldesign-color-infoStatusInfo element accent

Borders

Nextcloud VariableNL Design MappingCategoryNotes
--color-border--nldesign-color-borderBorderStandard border color
--color-border-dark--nldesign-color-border-darkBorderDark border variant
--color-border-maxcontrast--nldesign-color-border-darkBorderMax contrast border; maps to dark border
--border-width-inputunmappedBorderInput border width (1px); standard across all themes
--border-width-input-focusedunmappedBorderFocused input border width (2px); standard

Border Radius

Nextcloud VariableNL Design MappingCategoryNotes
--border-radius--nldesign-border-radiusBorder RadiusDeprecated; default border radius
--border-radius-small--nldesign-border-radius-smallBorder RadiusSmall elements (4px default)
--border-radius-element--nldesign-border-radiusBorder RadiusInteractive elements (8px default)
--border-radius-containerunmappedBorder RadiusContainers (12px); intentionally not overridden for layout consistency
--border-radius-container-largeunmappedBorder RadiusLarge containers (16px); intentionally not overridden
--border-radius-large--nldesign-border-radius-largeBorder RadiusDeprecated alias for element radius
--border-radius-rounded--nldesign-border-radius-roundedBorder RadiusRounded elements (28px default)
--border-radius-pill--nldesign-border-radius-pillBorder RadiusPill shape (100px)

Typography

Nextcloud VariableNL Design MappingCategoryNotes
--font-face--nldesign-font-familyTypographyFont stack
--default-font-sizeunmappedTypographyBase font size (15px); standard across themes
--font-size-smallunmappedTypographySmall font size (13px); standard
--default-line-heightunmappedTypographyLine height (1.5); standard

Spacing & Clickable Areas

Nextcloud VariableNL Design MappingCategoryNotes
--default-clickable-areaunmappedSpacingTouch target (34px); accessibility standard
--clickable-area-largeunmappedSpacingLarge touch target (48px); accessibility standard
--clickable-area-smallunmappedSpacingSmall touch target (24px); accessibility standard
--default-grid-baselineunmappedSpacingBase grid unit (4px); core layout building block

Layout & Dimensions

Nextcloud VariableNL Design MappingCategoryNotes
--header-heightintentionally not overriddenLayoutHeader height (50px); overriding breaks NC layout
--header-menu-item-heightintentionally not overriddenLayoutHeader menu item height; NC layout dependent
--header-menu-icon-maskintentionally not overriddenLayoutIcon mask gradient; NC internal
--navigation-widthintentionally not overriddenLayoutNavigation panel width (300px); NC layout dependent
--sidebar-min-widthintentionally not overriddenLayoutSidebar min width; NC layout dependent
--sidebar-max-widthintentionally not overriddenLayoutSidebar max width; NC layout dependent
--body-container-radiusintentionally not overriddenLayoutBody container radius; depends on border-radius-container-large
--body-container-marginintentionally not overriddenLayoutBody container margin; NC layout dependent
--body-heightintentionally not overriddenLayoutBody height calculation; NC layout dependent
--breakpoint-mobileintentionally not overriddenLayoutMobile breakpoint (1024px); NC responsive design
--footer-heightintentionally not overriddenLayoutFooter height; NC layout dependent

Animations

Nextcloud VariableNL Design MappingCategoryNotes
--animation-quick--nldesign-animation-quickAnimationQuick animation duration (100ms)
--animation-slow--nldesign-animation-slowAnimationSlow animation duration (300ms)
--filter-background-blurintentionally not overriddenAnimationBackground blur filter; Nextcloud handles browser compat

Shadows

Nextcloud VariableNL Design MappingCategoryNotes
--color-box-shadow-rgbunmappedShadowBox shadow RGB; auto-calculated from background
--color-box-shadowunmappedShadowBox shadow color; depends on --color-box-shadow-rgb

Gradients

Nextcloud VariableNL Design MappingCategoryNotes
--gradient-main-backgroundintentionally not overriddenGradientMain background gradient; depends on main-background vars
--gradient-primary-backgroundintentionally not overriddenGradientPrimary gradient; depends on primary color

Special Colors

Nextcloud VariableNL Design MappingCategoryNotes
--color-favorite--nldesign-color-favoriteSpecialFavorite/star color
--color-loading-lightunmappedSpecialLoading animation light; NC internal
--color-loading-darkunmappedSpecialLoading animation dark; NC internal
--color-scrollbarintentionally not overriddenSpecialScrollbar color; depends on border-maxcontrast

Focus

Nextcloud VariableNL Design MappingCategoryNotes
(no direct NC variable)--nldesign-color-focusFocusNL Design focus ring color; applied via theme.css
(no direct NC variable)--nldesign-color-focus-rgbFocusRGB variant for focus opacity

Filters & Inversion

Nextcloud VariableNL Design MappingCategoryNotes
--background-invert-if-darkintentionally not overriddenFilterDark mode image inversion; NC theme dependent
--background-invert-if-brightintentionally not overriddenFilterBright mode inversion; NC theme dependent
--background-image-invert-if-brightintentionally not overriddenFilterBackground image inversion; NC theme dependent
--primary-invert-if-brightintentionally not overriddenFilterPrimary color inversion; NC auto-calculates
--primary-invert-if-darkintentionally not overriddenFilterPrimary dark inversion; NC auto-calculates

Images & Resources

Nextcloud VariableNL Design MappingCategoryNotes
--image-backgroundintentionally not overriddenImageBackground image; admin/user configured
--image-logoheader-customintentionally not overriddenImageLogo header flag; admin setting
--image-logointentionally not overriddenImageLogo URL; admin setting

Assistant (AI)

Nextcloud VariableNL Design MappingCategoryNotes
--color-background-assistantintentionally not overriddenAssistantAI assistant background; NC-specific feature
--color-border-assistantintentionally not overriddenAssistantAI assistant border gradient; NC-specific
--color-element-assistantintentionally not overriddenAssistantAI assistant element gradient; NC-specific
--color-element-assistant-iconintentionally not overriddenAssistantAI assistant icon gradient; NC-specific

Header & Navigation (NL Design specific)

These are --nldesign-* tokens that don't map to standard Nextcloud variables but are used in overrides.css for direct element styling:

NL Design TokenPurposeNotes
--nldesign-color-header-backgroundHeader background colorApplied via element selectors in overrides.css
--nldesign-color-header-textHeader text colorApplied via element selectors
--nldesign-header-border-bottomHeader bottom borderApplied via element selectors
--nldesign-color-nav-backgroundNavigation backgroundApplied via element selectors
--nldesign-color-button-primary-backgroundPrimary button backgroundApplied to .button-vue--vue-primary
--nldesign-color-button-primary-textPrimary button textApplied to .button-vue--vue-primary
--nldesign-color-button-primary-borderPrimary button borderApplied to .button-vue--vue-primary
--nldesign-color-button-primary-hoverPrimary button hoverApplied to .button-vue--vue-primary:hover
--nldesign-color-linkLink colorApplied to a elements
--nldesign-color-link-hoverLink hover colorApplied to a:hover
--nldesign-color-link-visitedVisited link colorApplied to a:visited

Summary

CategoryTotal VariablesMappedUnmappedIntentionally Not Overridden
Primary131210
Background9306
Placeholder2200
Text9630
Status (Error)6510
Status (Warning)5230
Status (Success)6420
Status (Info)5230
Border5320
Border Radius8620
Typography4130
Spacing4040
Layout110011
Animation3201
Shadow2020
Gradient2002
Special3120
Focus0000
Filter5005
Image3003
Assistant4004
Total102492832