group() Function for Managing Sass Variables in SuiteCommerce
The group() function simplifies Sass variable management in SuiteCommerce for organized themes and easy editing.
The group() function is a key feature for managing Sass variables in SuiteCommerce, allowing developers to create defined groups of variables for better organization and usability. Understanding how to effectively implement this function is essential for theme development.
What Is the group() Function?
The group() function allows you to define a structured grouping of variables within your Sass files. It is not mandatory to place the group() function immediately after variable declarations, but for clarity and maintenance, it is advisable to introduce the function in the same file as the associated variables.
Key Properties of the group() Function
Each invocation of the group() function accepts a JSON object that includes these primary properties:
| Property Name | Description |
|---|---|
id | A unique identifier for the group. |
label | A formatted string for display in the SMT Theme Skin Manager. |
description | An optional long-form description of the group. |
children | An array listing variable names (prefixed with $) or other group IDs. |
Note: Variables or subgroups listed under children do not need to be defined before the group() call.
Example Implementation
Below is an example illustrating the declaration of a parent group called palette-color along with several child groups:
1/*2group({3 "id": "palette-color",4 "label": "Palette",5 "description": "",6 "children": [7 "theme-palette",8 "neutral-shades",9 "text-colors",10 "container-colors"11 ]12})13*/Subsequent declarations show how to create groups for individual themes and color sets:
1/*2group({3 "id": "theme-palette",4 "label": "Theme palette",5 "description": "",6 "children": [7 "$sc-color-theme",8 "$sc-color-theme-900",9 "$sc-color-theme-700",10 "$sc-color-theme-500",11 "$sc-color-theme-300",12 "$sc-color-theme-100",13 "$sc-color-primary",14 "$sc-color-secondary"15 ]16})17*/Here, you'll also find similar declarations for neutral-shades, text-colors, and container-colors. Each group allows setting subgroups and establishing a clear structure for asset management within the theme.
UI Representation in SMT
When these groups are implemented, the SMT side panel reflects the hierarchical organization:
- The top-level group is shown as a header (e.g., Palette).
- Nested subgroups can be collapsed or expanded.
- Variables can be edited directly in the SMT by administrators, enhancing the management of styles.

Note: These structures utilize derived values, meaning any base color adjustments will automatically reflect in any dependent styles, providing a seamless update experience.
Key Takeaways
- The
group()function simplifies the management of Sass variables in SuiteCommerce. - It allows for organized grouping of color variables, enhancing editing capabilities.
- The SMT Theme Skin Manager provides a user-friendly interface for developers and administrators to manage these groups effectively.
Frequently Asked Questions (4)
Does the `group()` function require the Sass variables to be declared before its invocation?
What information does each `group()` function require?
How does the `group()` function enhance the SMT Theme Skin Manager?
Is it mandatory to use the `group()` function for Sass variable management in SuiteCommerce?
Was this article helpful?
More in Commerce
- Available Items Only Filtering in NetSuite 2026.1
Available items only filtering enhances sales efficiency in NetSuite 2026.1 with Intelligent Item Recommendations.
- Best Practices for Fields and Facets in NetSuite Commerce
Optimize performance in NetSuite Commerce by using fields and facets efficiently, limiting unnecessary data and enhancing user experience.
- SuiteCommerce Updates in NetSuite 2026.1 Release Notes
SuiteCommerce, MyAccount, and Advanced updates introduced in NetSuite 2026.1 enhance eCommerce capabilities and require migration for SCA.
- eCommerce Performance with NetSuite 2026.1 Commerce Extensions
Explore how Commerce Extensions in NetSuite 2026.1 enhance eCommerce performance and user experience with key features and best practices.
