Skip to content

Theme-Variablen

Diese Referenz ist die kompakte Lookup-Tabelle für SCSS-Variablen, ihre Quellen in theme.json und ihre Defaults. Für eine erläuterte Architektur-Übersicht siehe Variablen & Tokens.

Quellen

DateiZweck
abstract/variables/bootstrap.scssBootstrap-Overrides, bindet $sw-*-Tokens an Bootstrap-Defaults
abstract/variables/custom.scssGuppy-eigene Tokens (Lieferstatus, Produktbilder, Focus, Icons …)
skin/shopware/abstract/variables/bootstrap.scssShopware-Integration-Overrides (Bootstrap)
skin/shopware/abstract/variables/theme.scssShopware-Integration-Overrides (Theme)
theme.jsonAdmin-Konfiguration, befüllt $sw-*-Tokens

Brand-Farben

SCSStheme.jsonDefaultVerwendung
$sw-color-brand-primarysw-color-brand-primary#215AFFPrimärfarbe
$sw-color-brand-secondarysw-color-brand-secondary#0B1845Sekundärfarbe
$sw-background-colorsw-background-color#FFFFFFHintergrund
$sw-border-colorsw-border-color#CFD1D7Rahmen
$sw-text-colorsw-text-color#1B1F29Textfarbe
$sw-headline-colorsw-headline-color#1B1F29Überschriften

Graustufen

SCSSDefault
$sw-color-gray-100#F9F9F9
$sw-color-gray-200#EEEEEE
$sw-color-gray-300#BCC1C7
$sw-color-gray-400#CED4DA
$sw-color-gray-500#ADB5BD
$sw-color-gray-600#798490
$sw-color-gray-700#495057
$sw-color-gray-800#4A545B
$sw-color-gray-900#212529

Typografie

SCSStheme.jsonDefault
$sw-font-size-basesw-font-size-base1rem
$sw-h1-font-sizesw-h1-font-size32px
$sw-h2-font-sizesw-h2-font-size24px
$sw-h3-font-sizesw-h3-font-size20px
$sw-h4-font-sizesw-h4-font-size18px
$sw-h5-font-sizesw-h5-font-size16px
$sw-h6-font-sizesw-h6-font-size15px
$sw-h1-line-heightsw-h1-line-height44px
$sw-h2-line-heightsw-h2-line-height36px
$sw-h3-line-heightsw-h3-line-height32px

Container und Padding

SCSSDefault
$guppy-container-width-default1400px
$guppy-container-width-fluid100%
$guppy-container-width-sm1230px
$guppy-container-default-padding-x-mobile10px
$guppy-container-default-padding-x-sm24px
$guppy-container-default-padding-x-md48px
$guppy-container-default-padding-x-lg48px
$guppy-container-default-padding-x-xl48px
$guppy-container-default-padding-x-xxl48px

CMS-Section-Padding

SCSStheme.jsonDefault
$guppy-cms-section-padding-xguppy-cms-section-padding-x48px
$guppy-cms-section-padding-yguppy-cms-section-padding-y48px
$guppy-cms-section-padding-y-2xguppy-cms-section-padding-y-2x96px

Buttons und Inputs

SCSStheme.jsonDefault
$sw-input-btn-font-sizesw-input-btn-font-size16px
$sw-input-btn-border-radiussw-input-btn-border-radius4px
$sw-input-btn-font-weightsw-input-btn-font-weightnormal

Icons

SCSSDefaultVerwendung
$icon-base-size22pxBasisgröße
$icon-base-colorcurrentColorVererbt Textfarbe
$icon-accessibility-touch-size44pxMin. Touch-Target (WCAG 2.5.5)

Produktbilder

SCSSDefaultVerwendung
$product-image-height240pxStandardhöhe
$product-image-height-lgfit-contentHöhe auf großen Bildschirmen
$product-image-aspect-ratio10/9Aspect-Ratio
$product-image-background$sw-color-product-imageHintergrund

Accessibility

SCSSDefaultVerwendung
$focus-outline-width2pxFocus-Rahmenbreite
$focus-outline-color$sw-color-brand-primaryFocus-Rahmenfarbe
$focus-outline-offset2pxAbstand zum Element
$focus-outline-box-shadow0 0 0 2px #fffzusätzlicher Schatten

Lieferstatus

SCSSDefault
$guppy-delivery-shipping-free-color#023B5A
$guppy-delivery-shipping-free-background#CEEDFE
$guppy-delivery-available-color#154634
$guppy-delivery-available-background#D3F2E7
$guppy-delivery-restock-color#5D3B00
$guppy-delivery-restock-background#FFEFD4
$guppy-delivery-soldout-color#303030
$guppy-delivery-soldout-background#EEEEEE

Badges

theme.jsonDefault
guppy-badges-new-background-color#22C087
guppy-badges-new-color#FFFFFF
guppy-badges-top-seller-background-color#F89C00
guppy-badges-top-seller-color#FFFFFF
guppy-badges-discount-background-color#E10036
guppy-badges-discount-color#FFFFFF

Alerts

theme.jsonDefault
guppy-alert-color-success#D3F2E7
guppy-alert-color-info#CEEDFE
guppy-alert-color-warning#FFEFD4
guppy-alert-color-danger#FDE2E7

Mixins (Auswahl)

MixinZweck
focus-styleeinheitliche Focus-Rahmen
line-height($value)responsive Line-Heights
rlh($value, $property)RLH-Variante mit Property-Wahl
button-adaptive-hover($base-color)Hover nur bei (hover: hover)
text-ellipsiseinzeiliges Ellipsis
text-clamp($lines)mehrzeiliges Ellipsis
visually-hiddenScreen-Reader-only

Functions

FunctionZweck
px-to-rem($px)Pixel zu rem
strip-unit($value)Einheit entfernen
shade-color($color, $weight)Farbe abdunkeln (Bootstrap)
tint-color($color, $weight)Farbe aufhellen (Bootstrap)
shift-color($color, $weight)je nach Helligkeit (Bootstrap)

Verwandt