Changes to Styles in 4.0
Note: Spartacus 4.x is no longer maintained. Please upgrade to the latest version.
Note: Spartacus 4.x was tested with SAP Commerce Cloud versions 1905 to 2205. Spartacus 4.x has not been verified to work with (and is not guaranteed to work with) SAP Commerce Cloud 2211 or later releases.
Changes in the storefrontstyles Components
- The
$page-template-blacklistSCSS variable name has been renamed to$page-template-blocklistin_page-template.scss. - The
$cart-components-whitelistSCSS variable name has been renamed to$cart-components-allowlistincart/_index.scss. - The
$cds-components-whitelistSCSS variable name has been renamed to$cds-components-allowlistincds/index.scss. - The
$store-finder-components-whitelistSCSS variable name has been renamed to$store-finder-components-allowlistinstore-finder/index.scss. - The
$checkout-components-whitelistSCSS variable name has been renamed to$checkout-components-allowlistincheckout/_index.scss. - The
$content-components-whitelistSCSS variable name has been renamed to$content-components-allowlistincontent/_index.scss. - The
$layout-components-whitelistSCSS variable name has been renamed to$layout-components-allowlistinlayout/_index.scss. - The
$misc-components-whitelistSCSS variable name has been renamed to$misc-components-allowlistinmisc/_index.scss. - The
$myaccount-components-whitelistSCSS variable name has been renamed to$myaccount-components-allowlistinmyaccount/_index.scss. - The
$product-components-whitelistSCSS variable name has been renamed to$product-components-allowlistinproduct/index.scss. - The
$product-list-whitelistSCSS variable name has been renamed to$product-list-allowlistinproduct/list/_index.scss. - The
$pwa-components-whitelistSCSS variable name has been renamed to$pwa-components-allowlistinpwa/add-to-home-screen-banner/_index.scss. - The
$user-components-whitelistSCSS variable name has been renamed to$user-components-allowlistinuser/_index.scss. - The
$wish-list-components-whitelistSCSS variable name has been renamed to$wish-list-components-allowlistinwish-list/index.scss.
Changes in the Organization Feature Library
- The
$page-template-blacklist-organizationSCSS variable name has been renamed to$page-template-blocklist-organization. - The
$page-template-whitelist-organizationSCSS variable name has been renamed to$page-template-allowlist-organization.
Changes in the Storefinder Feature Library
- The
$page-template-blacklist-store-finderSCSS variable name has been renamed to$page-template-blocklist-store-finder. - The
$page-template-whitelist-store-finderSCSS variable name has been renamed to$page-template-allowlist-store-finder.
Changes in the Checkout Components
- The
cx-product-variantsselector has been moved to the corresponding@spartacus/productfeature library.
Change in the Configurator Attribute Type Components
- The
cx-quantityselector has been added to achieve a consistent styling.
Changes in the Configurator Product Title Component
- The
widthis set to80%in the%cx-configurator-product-titleto use only 80% of the configuration product title width. - There is now a
buttoninstead of an anchor link in the%cx-configurator-product-title. - The
paddingis set to16px/ 32pxin the%cx-configurator-product-titlefor thecx-detailsselector to align spacing depending on the screen size. - The
cx-configurator-imagemixin has been defined in the%cx-configurator-product-titlefor thecx-details-imageselector to achieve a consistent styling. - The
cx-configurator-truncate-contentmixin has been added to the%cx-configurator-product-titlefor thecx-detail-title,cx-codeandcx-descriptionselectors to enable the truncation for the small widgets.
Changes in the Configurator Group Menu Component
- The
cx-group-menuclass replaces theulelement in the%cx-configurator-group-menu. - The
cx-configurator-truncate-contentmixin has been added to the%cx-configurator-group-menufor thespanselector to enable the configuration group title truncation for the small widgets.
Changes in the Configurator Form Component
- The
widthis set to100%in the%cx-configurator-formto use the whole width of the configuration form. - The
paddingis set to16pxin the%cx-configurator-formfor thecx-group-attributeto align the spacing between the configuration group attributes.
Changes in the Configurator Attribute Header Component
- The
marginis set to17pxin the%cx-configurator-attribute-headerto align the spacing to the attribute header to the attribute type. - The
paddingis set to0pxand themarginto17pxin the%cx-configurator-attribute-typeto align the spacing between the configuration attribute types.
Changes in the Configurator Attribute Drop-Down Component
- The
flex-directionis set tocolumnin the%cx-configurator-attribute-drop-down. - The
cx-configurator-attribute-level-quantity-pricemixin has been defined in the%cx-configurator-attribute-drop-downfor the.cx-attribute-level-quantity-priceclass to achieve a consistent styling. - The
margin-block-startis set to32pxin the%cx-configurator-attribute-drop-downfor the.cx-value-priceclass to align the spacing for mobile widget. - The
margin-block-startis set to32pxin the%cx-configurator-attribute-drop-downfor the.cx-attribute-level-quantity-priceclass to align the spacing.
Changes in the Configurator Attribute Checkbox List Component
- The
paddingis set to1remin the%cx-configurator-attribute-checkbox-listto define the spacing between the checkbox-list attribute type and the quantity counter. - The
cx-configurator-attribute-level-quantity-pricemixin has been defined in the%cx-configurator-attribute-checkbox-listfor thecx-attribute-level-quantity-priceselector to achieve a consistent styling. - The
cx-configurator-attribute-visible-focusmixin has been defined in the%cx-configurator-attribute-checkbox-listto enable visual focus.
Changes in the Configurator Attribute Radio Button Component
- The
paddingis set to1remin the%cx-configurator-attribute-radio-buttonto define the spacing between the radio-button attribute type and the quantity counter. - The
cx-configurator-attribute-level-quantity-pricemixin has been defined in the%cx-configurator-attribute-radio-buttonfor the.cx-attribute-level-quantity-priceclass to achieve a consistent styling. - The
cx-configurator-attribute-visible-focusmixin has been defined in the%cx-configurator-attribute-radio-buttonto enable visual focus.
Change in the Configurator Previous Next Button Component
- The
paddingis set to16pxin the%cx-configurator-previous-next-buttonsto align the spacing between the configuration form and the bottom of the configuration.
Change in the Configurator Price Summary Component
- The
paddingis set to16pxin the%cx-configurator-price-summaryfor thecx-total-summaryselector to align the spacing.
Change in the Configurator Footer Container Mixin
- The
paddingis set to16pxin the%cx-configurator-footer-containermixin to align the spacing between the price summary and add-to-cart button.
Change in the Configurator Required Error Message Mixin
- The
paddingis set to5pxin the%cx-configurator-required-error-msgmixin to add spacing at the end of thecx-iconselector.
Change in the Configurator Attribute Single-Selection Bundle Component
- The
cx-configurator-attribute-level-quantity-pricemixin has been replaced in the%cx-configurator-attribute-single-selection-bundletocx-configurator-bundle-attribute-level-quantity-price.
Change in the Configurator Attribute Multi-Selection Bundle Component
- The
cx-configurator-attribute-level-quantity-pricemixin has been replaced in the%cx-configurator-attribute-multi-selection-bundletocx-configurator-bundle-attribute-level-quantity-price.
Changes in the Configurator Attribute Type Mixin
- The
widthis set to100%in the%cx-configurator-attribute-typefor thefieldsetselector to use 100% of the width. - The
displayis set toflexin the%cx-configurator-attribute-typefor theform-checkselector. - The
flex-directionis set torowin the%cx-configurator-attribute-typefor theform-checkselector. - The
justify-contentis set tospace-betweenin the%cx-configurator-attribute-typefor theform-checkselector. - The
widthis set to80%in the%cx-configurator-attribute-typefor thecx-value-label-pairselector to use only 80% of the width. - The
padding-inline-endis set to10pxin the%cx-configurator-attribute-typefor thecx-value-label-pairselector. - The
line-breakhas been set toanywherein the%cx-configurator-attribute-typefor thecx-value-label-pairselector to enable a line break if the value pair label gets longer. - The
widthis set to20%in the%cx-configurator-attribute-typefor thecx-value-priceselector to use only 20% of the width.
Changes in Configurator Form Group Mixin
- The
widthis set to100%in the%cx-configurator-form-groupfor theform-groupselector to use 100% of the width. - The
displayis set toflexin the%cx-configurator-form-groupfor theform-groupselector. - The
flex-directionis set torowin the%cx-configurator-form-groupfor theform-groupselector. - The
align-itemsis set tocenterin the%cx-configurator-form-groupfor theform-groupselector. - The
justify-contentis set tospace-betweenin the%cx-configurator-form-groupfor theform-groupselector. - The
widthis set to80%in the%cx-configurator-form-groupfor theselectselector to use only 80% of the width. - The
widthis set to20%in the%cx-configurator-form-groupfor thecx-value-priceselector to use only 20% of the width.
Changes in the Configurator Attribute Level Quantity Price Mixin
- The
margin-block-starthas been removed from%cx-configurator-attribute-level-quantity-price. - The
margin-block-endhas been removed from%cx-configurator-attribute-level-quantity-price. - The
margin-inline-starthas been removed from%cx-configurator-attribute-level-quantity-price. - The
margin-inline-endhas been removed from%cx-configurator-attribute-level-quantity-price.
Changes in the Configurator Overview Form Component
- The
paddingis set to0pxin the%cx-configurator-overview-formto fix inconsistent spacings in the configuration overview form. - The
paddingis set to20pxand themarginto0pxin the%cx-configurator-overview-formfor thecx-groupselector to align spacing between the configuration overview groups. - The
paddingis set to32px/16pxin the%cx-configurator-overview-formfor theh2selector to align spacing around the configuration overview group titles. - The
cx-configurator-truncate-contentmixin has been added to the%cx-configurator-overview-formfor thespanselector to enable the overview group title truncation for the small widgets. - The
paddingis set to32pxin the%cx-configurator-overview-formfor thecx-attribute-value-pairselector to align spacing between the configuration overview attribute value pairs. - The
displayis set tonone / inlineandvisibilitytohiddenin the%cx-configurator-overview-formfor thecx-attribute-value-pairselector to define the visibility for the configuration overview attribute value label. - The
paddingis set to20pxin the%cx-configurator-overview-formfor thecx-no-attribute-value-pairsselector to align spacing between the configuration overview form and the container which is shown when there are no results, including a link for removing filter(s). - The
font-sizeis set to1.25remin the%cx-configurator-overview-formfor thetopLevelselector to adjust the attribute header according to the new styling requirement. - The
font-weightis set to700in the%cx-configurator-overview-formfor thetopLevelselector to adjust the attribute header according to the new styling requirement. - The
border-bottomis set tosolid 1px var(--cx-color-light)in the%cx-configurator-overview-formfor thetopLevelselector to create the bottom border of the attribute header. - The
border-topis set tosolid 1px var(--cx-color-light)in the%cx-configurator-overview-formfor thetopLevelselector to create the top border of the attribute header. - The
border-left-styleis set tononein the%cx-configurator-overview-formfor thetopLevelselector to achieve a top-bottom border. - The
border-right-styleis set tononein the%cx-configurator-overview-formfor thetopLevelselector to achieve a top-bottom border. - The
backgroundset tononein the%cx-configurator-overview-formfor thetopLevelto make the header background transparent. - The
text-transformis set tononein the%cx-configurator-overview-formfor thetopLevelto prevent the header form transforming to uppercase. - The
margin-bottomis set to-60pxin the%cx-configurator-overview-formfor thesubgroupTopLevelto eliminate the space between the top-level attribute header and its subgroups. - The
background-coloris set tovar(--cx-color-background)in the%cx-configurator-overview-formfor thecx-group h2to set the background color of the subgroup headers. - The
font-sizeis set to1remin the%cx-configurator-overview-formfor thecx-group h2to specify the font size of the subgroup headers. - The
text-transformis set touppercasein the%cx-configurator-overview-formfor thecx-group h2to transform the subgroup header into uppercase.
Changes in the Configurator Overview Attribute Component
- The
justify-contentis set tospace-betweenin the%cx-configurator-overview-attribute. - The
widthis set to50%in the%cx-configurator-overview-attributefor thecx-attribute-valueselector to use only50%of the width for the small widgets. - The
font-weightis set to600in the%cx-configurator-overview-attributefor thecx-attribute-valueselector to make the attribute values bold. - The
line-breakhas been set toanywherein the%cx-configurator-overview-attributefor thecx-attribute-valueselector to enable line break if the attribute value label gets longer. - The
padding-inline-endis set to10pxin the%cx-configurator-overview-attributefor thecx-attribute-valueselector to align spacing between thecx-attribute-valueselector and the next element. - The
widthis set to100%in the%cx-configurator-overview-attributefor thecx-attribute-labelselector to use 100% of the width for the small widgets. - The
padding-inline-endis set to10pxin the%cx-configurator-overview-attributefor thecx-attribute-labelselector to align spacing between thecx-attribute-labelselector and the next element. - The
line-breakhas been set toanywherein the%cx-configurator-overview-attributefor thecx-attribute-labelselector to enable a line break if the attribute value label gets longer. - The
widthis set to50%in the%cx-configurator-overview-attributefor thecx-attribute-priceselector to use only 50% of the width for the small widgets.
Changes in the Product Configurator Card Component
- The
.cx-card-titleclass was added (a11y). - The
.deselection-error-messageclass was added. - The
displayis set toinline-blockin the%cx-configurator-attribute-product-cardfor the&.deselection-error-messageto prevent a line break in the deselection error message. - The
widthis set to80%in the%cx-configurator-attribute-product-cardfor the&.deselection-error-messageto set the element’s box size and prevent a line break. - The
flex-wrapis set towrapin the%cx-configurator-attribute-product-cardfor the.cx-product-card-selectedto align the deselection error to the desired position. - The
padding-topis set to5pxin the%cx-configurator-attribute-product-cardfor the.deselection-error-messageto create space between the value description and the error message. - The
coloris set tovar(--cx-color-danger)in the%cx-configurator-attribute-product-cardfor the.deselection-error-messageto signal the message as an error message. - The
padding-rightis set to5pxin the%cx-configurator-attribute-product-cardfor the.deselection-error-message-symbolto create space between the message and the ‘error’ icon.
Change in the Cart Item Component
- An
h2was added under.cx-nameto account for the change in the markup template for improved screen reader support (a11y).
Change in the Order Summary Component
- The
h4was changed toh3to account for the change in the markup template for improved screen reader support (a11y).
Change in the Review Submit Component
- A
type(3)was added to the.cx-review-titleclass to retain the previous style after changes in the markup template.
Change in index.scss
- A new
cx-page-headercomponent was added to the allow list (a11y). _screen-reader.scsswas added, which will contain screen reader specific styles (a11y).
Changes in the Category Navigation Component
- The
h5was changed tospanto account for the change in the markup template for improved screen reader support (a11y). - The
nav.is-open > h5was changed toli.is-open > spanto remove headings from the category navigation for improved categorization in the screen reader elements dialog (a11y).
Change in the Footer Navigation Component
- The
h5was changed tospanunder.flyout,@include media-breakpoint-down(md),navandnav >to account for the change in the markup template for improved screen reader support (a11y).
Change in the Carousel Component
- The
h3was changed to anh2to account for the change in the markup template for improved screen reader support (a11y).
Change in the Product Carousel Component
- The
h4was changed to anh3to account for the change in the markup template for improved screen reader support (a11y).
Change in the Product List Item Component
- An
h2was added to account for the change in the markup template for improved screen reader support (a11y).
Change in the Wish List Item Component
- An
h2added to account for the change in the markup template for improved screen reader support (a11y).
Change in the Checkout Media Style Component
type(3)andfont-weightwere added to retain the existing styling after a change in the markup template for improved screen reader support (a11y).
Change in _screen-reader.scss
- The
.cx-visually-hiddenclass was added. This class can be used to hide elements specific to screen reader announcement and narration (a11y).
Change in _list.scss
.cx-table td .textand.cx-table td apadding-inline-start removed to align thecx-orgtable items with head labels.
Change in buttons.scss`
text-transform: var(--cx-button-text-transform)is changed totext-transform: var(--cx-text-transform)to accommodate for theme changes.
Changes in _searchbox.scss
cx-icon.resetwas changed tobutton.reset.dirty cx-icon.searchwas changed to.dirty div.search:not(.dirty) cx-icon.resetwas changed to:not(.dirty) button.resetcx-iconwas changed tobutton, div.searchcursor: pointerwas removed..resetwas changed to.reset cx-iconh4.namewas changed todiv.name
Change in _payment-form.scss
legendwas added withfont-size: 1remin.cx-payment-form-exp-date
Change in _list.scss
.sorthas been wrapped in alabelin.header.actions. Amin-width: 170px;was added for.sortand a few other stylings forlabel.
Change in _my-coupons.scss
- Styling was added for
.cx-my-coupons-form-group:align-items: center; display: flex;and a few other stylings forspanandcx-sorting.
Change in _my-interests.scss
- Styling was added for
.cx-product-interests-form-group:align-items: center; display: flex;and a few other stylings forspanandcx-sorting.
Change in _order-history.scss and _order-return-request-list.scss
- Styling added for
cx-order-history-form-group:align-items: center; display: flex;and a few other stylings forspanandcx-sorting.
Change in _replenishment-order-history.scss
- Styling added for
.cx-replenishment-order-history-form-group:align-items: center; display: flex;and a few other stylings forspanandcx-sorting.
Change in _product-list.scss
- Styling added for
.cx-sort-dropdown:align-items: center; display: flex;and a few other stylings forspanandcx-sorting. text-transform: var(--cx-button-text-transform)was changed totext-transform: var(--cx-text-transform)to accommodate for theme changes.
Change in _popover.scss
popover-body > .closehas been moved topopover-body > .cx-close-row > .close.
Changes in navigation-ui.scss
popover-body > .closehas been moved topopover-body > .cx-close-row > .close.padding-bottom: 25pxwas changed topadding-bottom: 22pxto accommodate for the header navigation links line-heights.
Change in _versioning.scss
- For the 4.0 release, themes for versioning of minor releases was changed from
$_fullVersion: 3.3;and$_majorVersion: 3;to$_fullVersion: 4;and$_majorVersion: 4;, respectively.