@fundamental-styles/common-css 0.41.0-rc.87 → 0.41.0-rc.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +163 -20
- package/dist/common-css.css +1 -1
- package/dist/js/common-css.mjs +1 -1
- package/dist/js/sap-border-radius.mjs +1 -1
- package/dist/js/sap-border.mjs +1 -1
- package/dist/js/sap-busy-indicator.mjs +1 -1
- package/dist/js/sap-colors.mjs +1 -1
- package/dist/js/sap-container-type.mjs +1 -1
- package/dist/js/sap-content-paddings.mjs +1 -1
- package/dist/js/sap-display.mjs +1 -1
- package/dist/js/sap-elevation.mjs +1 -1
- package/dist/js/sap-flex.mjs +1 -1
- package/dist/js/sap-heading.mjs +1 -1
- package/dist/js/sap-label.mjs +1 -1
- package/dist/js/sap-main-colors.mjs +1 -1
- package/dist/js/sap-margin.mjs +1 -1
- package/dist/js/sap-normalize.mjs +1 -1
- package/dist/js/sap-overflow.mjs +1 -1
- package/dist/js/sap-padding.mjs +1 -1
- package/dist/js/sap-position.mjs +1 -1
- package/dist/js/sap-shadow.mjs +1 -1
- package/dist/js/sap-sr-only.mjs +1 -1
- package/dist/js/sap-text.mjs +1 -1
- package/dist/js/sap-title.mjs +1 -1
- package/dist/js/sap-typography.mjs +1 -1
- package/dist/sap-border-radius.css +1 -1
- package/dist/sap-border.css +1 -1
- package/dist/sap-busy-indicator.css +1 -1
- package/dist/sap-colors.css +1 -1
- package/dist/sap-container-type.css +1 -1
- package/dist/sap-content-paddings.css +1 -1
- package/dist/sap-display.css +1 -1
- package/dist/sap-elevation.css +1 -1
- package/dist/sap-flex.css +1 -1
- package/dist/sap-heading.css +1 -1
- package/dist/sap-label.css +1 -1
- package/dist/sap-main-colors.css +1 -1
- package/dist/sap-margin.css +1 -1
- package/dist/sap-normalize.css +1 -1
- package/dist/sap-overflow.css +1 -1
- package/dist/sap-padding.css +1 -1
- package/dist/sap-position.css +1 -1
- package/dist/sap-shadow.css +1 -1
- package/dist/sap-sr-only.css +1 -1
- package/dist/sap-text.css +1 -1
- package/dist/sap-title.css +1 -1
- package/dist/sap-typography.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.41.0-rc.89](https://github.com/SAP/fundamental-styles/compare/v0.41.0-rc.88...v0.41.0-rc.89) (2025-12-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @fundamental-styles/common-css
|
|
9
|
+
|
|
10
|
+
# [0.41.0-rc.88](https://github.com/SAP/fundamental-styles/compare/v0.41.0-rc.87...v0.41.0-rc.88) (2025-12-03)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @fundamental-styles/common-css
|
|
13
|
+
|
|
6
14
|
# [0.41.0-rc.87](https://github.com/SAP/fundamental-styles/compare/v1.0.0-rc.0...v0.41.0-rc.87) (2025-12-03)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @fundamental-styles/common-css
|
package/README.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
## What is SAP UI Common CSS?
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The Common CSS package provides a comprehensive collection of utility CSS classes and SCSS mixins designed to simplify styling for SAP applications. It offers a complete toolkit for applying spacing, colors, typography, shadows, positioning, borders, flex layouts, and more without writing custom CSS, ensuring consistency with the SAP Design System.
|
|
4
4
|
|
|
5
5
|
**Key Features:**
|
|
6
6
|
|
|
7
|
-
- ✅ Utility CSS Classes – Apply predefined styles for margin
|
|
8
|
-
- ✅ SCSS Mixins – Build custom, reusable styles with parameters for flexibility
|
|
9
|
-
- ✅ SAP Design System –
|
|
10
|
-
- ✅ BEM Naming Convention – Clear and predictable class names.
|
|
11
|
-
- ✅ Full and Modular Builds – Use the entire library or import only what you need (e.g., colors, borders, spacing)
|
|
12
|
-
- ✅
|
|
7
|
+
- ✅ **Utility CSS Classes** – Apply predefined styles for spacing (margin/padding), colors, typography, borders, shadows, flexbox, positioning, display, overflow, and more
|
|
8
|
+
- ✅ **SCSS Mixins & Variables** – Build custom, reusable styles with parameters for maximum flexibility
|
|
9
|
+
- ✅ **SAP Design System Aligned** – All values and patterns align with SAP theming standards
|
|
10
|
+
- ✅ **BEM Naming Convention** – Clear and predictable class names (e.g., `sap-margin-small`, `sap-padding-inline-tiny`)
|
|
11
|
+
- ✅ **Full and Modular Builds** – Use the entire library or import only what you need (e.g., colors, borders, spacing)
|
|
12
|
+
- ✅ **Responsive & Container Queries** – Built-in support for responsive design and modern container queries
|
|
13
|
+
- ✅ **RTL Support** – Automatic right-to-left layout support for international applications
|
|
14
|
+
- ✅ **Theming Integration** – Works seamlessly with SAP theming variables via @sap-theming/theming-base-content
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
|
|
@@ -102,33 +104,174 @@ The sass folder includes:
|
|
|
102
104
|
@fundamental-styles/common-css/
|
|
103
105
|
│
|
|
104
106
|
├── dist/
|
|
105
|
-
│ ├── common-css.css
|
|
106
|
-
│ ├── sap-colors.css
|
|
107
|
-
│ ├── sap-
|
|
108
|
-
│ ├──
|
|
107
|
+
│ ├── common-css.css // Full build with all utilities
|
|
108
|
+
│ ├── sap-colors.css // Color utilities
|
|
109
|
+
│ ├── sap-main-colors.css // Main color palette
|
|
110
|
+
│ ├── sap-border.css // Border utilities
|
|
111
|
+
│ ├── sap-border-radius.css // Border radius utilities
|
|
112
|
+
│ ├── sap-margin.css // Margin spacing utilities
|
|
113
|
+
│ ├── sap-padding.css // Padding spacing utilities
|
|
114
|
+
│ ├── sap-content-paddings.css // Responsive content padding utilities
|
|
115
|
+
│ ├── sap-shadow.css // Shadow utilities
|
|
116
|
+
│ ├── sap-elevation.css // Z-index elevation utilities
|
|
117
|
+
│ ├── sap-typography.css // Font family and size utilities
|
|
118
|
+
│ ├── sap-text.css // Text utilities
|
|
119
|
+
│ ├── sap-heading.css // Heading utilities
|
|
120
|
+
│ ├── sap-label.css // Label utilities
|
|
121
|
+
│ ├── sap-title.css // Title utilities
|
|
122
|
+
│ ├── sap-flex.css // Flexbox utilities
|
|
123
|
+
│ ├── sap-display.css // Display utilities
|
|
124
|
+
│ ├── sap-position.css // Position utilities
|
|
125
|
+
│ ├── sap-overflow.css // Overflow utilities
|
|
126
|
+
│ ├── sap-container-type.css // Container query utilities
|
|
127
|
+
│ ├── sap-busy-indicator.css // Busy indicator utilities
|
|
128
|
+
│ ├── sap-normalize.css // Normalize/reset styles
|
|
129
|
+
│ └── sap-sr-only.css // Screen reader utilities
|
|
109
130
|
│
|
|
110
131
|
├── sass/
|
|
111
|
-
│ ├── _common-mixins.scss
|
|
112
|
-
│ ├── _common-variables.scss
|
|
113
|
-
│
|
|
132
|
+
│ ├── _common-mixins.scss // 80+ utility mixins
|
|
133
|
+
│ ├── _common-variables.scss // Design tokens and variables
|
|
134
|
+
│ └── _common-settings.scss // Default configuration
|
|
114
135
|
|
|
115
136
|
```
|
|
116
137
|
|
|
138
|
+
## What's Included
|
|
139
|
+
|
|
140
|
+
### Utility Classes Available
|
|
141
|
+
|
|
142
|
+
**Spacing:**
|
|
143
|
+
- Margin utilities: `sap-margin-{tiny|small|medium|large}`, `sap-margin-{side}-{size}`, `sap-margin-responsive`
|
|
144
|
+
- Padding utilities: `sap-padding-{tiny|small|medium|large}`, `sap-padding-{side}-{size}`, `sap-padding-responsive`
|
|
145
|
+
- Content padding utilities with responsive container queries
|
|
146
|
+
|
|
147
|
+
**Layout:**
|
|
148
|
+
- Flexbox utilities: `sap-flex-{direction}`, `sap-flex-gap-{size}`, `sap-flex-justify-{type}`, `sap-flex-align-{type}`, `sap-flex-wrap-{type}`
|
|
149
|
+
- Display utilities: `sap-display-{block|inline|flex|grid|none}`
|
|
150
|
+
- Position utilities: `sap-position-{absolute|relative|fixed|sticky}`
|
|
151
|
+
- Overflow utilities: `sap-overflow-{auto|hidden|scroll|visible}`
|
|
152
|
+
- Elevation utilities: `sap-elevation-{0-20}`
|
|
153
|
+
|
|
154
|
+
**Visual:**
|
|
155
|
+
- Color utilities: `sap-color-{colorName}`, `sap-bg-color-{colorName}`
|
|
156
|
+
- Border utilities: `sap-border-{width}-{style}-{color}`, `sap-border-radius-{element|button|field|group|popover|tile}`
|
|
157
|
+
- Shadow utilities: `sap-shadow-{level-0|level-1|level-2|level-3|header|shell}`
|
|
158
|
+
|
|
159
|
+
**Typography:**
|
|
160
|
+
- Font family: `sap-font-family-{regular|light|bold|semibold|monospaced-regular|monospaced-bold|black|header}`
|
|
161
|
+
- Font size: `sap-font-size-{small|medium|large|header-1|header-2|header-3|header-4|header-5|header-6}`
|
|
162
|
+
- Heading utilities: `sap-heading-{h1|h2|h3|h4|h5|h6}`
|
|
163
|
+
- Text utilities with line clamping, hyphenation, and wrapping support
|
|
164
|
+
- Label utilities with required/colon indicators
|
|
165
|
+
|
|
166
|
+
**Accessibility:**
|
|
167
|
+
- Screen reader only: `sap-sr-only`
|
|
168
|
+
- Normalize/reset styles
|
|
169
|
+
|
|
170
|
+
**Advanced:**
|
|
171
|
+
- Container query utilities: `sap-container-type-{inline-size|size|normal}`
|
|
172
|
+
- Busy indicator utilities
|
|
173
|
+
- Responsive design with media query support
|
|
174
|
+
|
|
175
|
+
### SCSS Mixins Available
|
|
176
|
+
|
|
177
|
+
Over 80 powerful mixins for custom styling, including:
|
|
178
|
+
|
|
179
|
+
**State Mixins:**
|
|
180
|
+
- `sap-hover`, `sap-active`, `sap-focus`, `sap-disabled`, `sap-selected`, `sap-readonly`, `sap-pressed`
|
|
181
|
+
|
|
182
|
+
**Layout Mixins:**
|
|
183
|
+
- `sap-flex($direction)`, `sap-flex-center`, `sap-flex-vertical-center`
|
|
184
|
+
- `sap-position($type, $top, $right, $bottom, $left)`, `sap-position-absolute-center`
|
|
185
|
+
- `sap-display($type)`
|
|
186
|
+
|
|
187
|
+
**Spacing Mixins:**
|
|
188
|
+
- `sap-padding($value, $side)`, `sap-padding-responsive`
|
|
189
|
+
- `sap-margin($value, $side)`, `sap-margin-responsive`
|
|
190
|
+
- `sap-content-paddings($type, $size)` with container query support
|
|
191
|
+
|
|
192
|
+
**Visual Mixins:**
|
|
193
|
+
- `sap-border($width, $style, $color, $pos)`, `sap-set-border-radius($value)`
|
|
194
|
+
- `sap-shadow($type)`, `sap-elevation($index)`
|
|
195
|
+
- `sap-color($color)`, `sap-bg-color($color)`
|
|
196
|
+
|
|
197
|
+
**Typography Mixins:**
|
|
198
|
+
- `sap-font-family($type)`, `sap-font-size($size)`, `sap-font($type)`
|
|
199
|
+
- `sap-heading($size)`, `sap-label($required, $colon)`, `sap-text($modifier)`
|
|
200
|
+
- `sap-ellipsis`
|
|
201
|
+
|
|
202
|
+
**Responsive Mixins:**
|
|
203
|
+
- `sap-media-sm`, `sap-media-md`, `sap-media-lg`, `sap-media-xl`
|
|
204
|
+
- `sap-container-query-sm`, `sap-container-query-md`, `sap-container-query-lg`, `sap-container-query-xl`
|
|
205
|
+
|
|
206
|
+
**Focus & Accessibility:**
|
|
207
|
+
- `sap-fiori-focus($offset, $alternative)`, `sap-fake-fiori-focus($offset, $radius, $alternative)`
|
|
208
|
+
- `sap-sr-only`
|
|
209
|
+
|
|
210
|
+
**RTL Support:**
|
|
211
|
+
- `sap-rtl` for automatic right-to-left layout handling
|
|
212
|
+
- RTL-aware padding, margin, and position mixins
|
|
213
|
+
|
|
117
214
|
## Examples
|
|
118
215
|
|
|
119
216
|
### Using Utility Classes
|
|
120
217
|
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
|
|
218
|
+
```html
|
|
219
|
+
<!-- Spacing and layout -->
|
|
220
|
+
<div class="sap-margin-small sap-padding-inline-tiny sap-flex-row sap-flex-gap-small">
|
|
221
|
+
Flexbox container with margin and padding
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
<!-- Visual styling -->
|
|
225
|
+
<div class="sap-border-radius-element sap-shadow-level-1 sap-bg-color-neutral sap-padding-medium">
|
|
226
|
+
Card with border radius, shadow, and background
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
<!-- Typography -->
|
|
230
|
+
<h1 class="sap-heading-h1 sap-margin-bottom-medium">Page Title</h1>
|
|
231
|
+
<p class="sap-font-standard-text sap-text">Regular text content</p>
|
|
232
|
+
|
|
233
|
+
<!-- Responsive padding with container queries -->
|
|
234
|
+
<div class="sap-container-type-inline-size sap-content-paddings-container-responsive">
|
|
235
|
+
Responsive container
|
|
124
236
|
</div>
|
|
125
237
|
```
|
|
126
238
|
|
|
127
239
|
### Using SCSS Mixins
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
240
|
+
|
|
241
|
+
```scss
|
|
242
|
+
// Custom component with spacing and shadow
|
|
243
|
+
.my-card {
|
|
244
|
+
@include sap-padding(medium);
|
|
245
|
+
@include sap-margin(large, y);
|
|
131
246
|
@include sap-shadow(level-2);
|
|
247
|
+
@include sap-set-border-radius(element);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Flexbox layout with gap
|
|
251
|
+
.toolbar {
|
|
252
|
+
@include sap-flex-gap(small, '', row);
|
|
253
|
+
@include sap-flex-align-items(center);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Responsive content with container queries
|
|
257
|
+
.responsive-container {
|
|
258
|
+
@include sap-container-type(inline-size);
|
|
259
|
+
@include sap-padding-container-responsive();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Custom heading with focus state
|
|
263
|
+
.custom-heading {
|
|
264
|
+
@include sap-heading(h2);
|
|
265
|
+
|
|
266
|
+
@include sap-fiori-focus(-0.1875rem) {
|
|
267
|
+
// Focus styles automatically applied
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// RTL-aware positioning
|
|
272
|
+
.positioned-element {
|
|
273
|
+
@include sap-set-position-left(1rem); // Automatically flips for RTL
|
|
274
|
+
@include sap-set-padding-right(0.5rem); // Automatically flips for RTL
|
|
132
275
|
}
|
|
133
276
|
```
|
|
134
277
|
|