Skip to content

Commit 0e095e6

Browse files
authored
docs: improve styling guides (#12112)
1 parent ba613f4 commit 0e095e6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/2-advanced/11-styles.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ You can try this yourself using the Input [sample](https://sap.github.io/ui5-web
2121

2222
Unfortunately, this can't be done for all components because it depends on the complexity of the DOM structure.
2323

24+
**Note:** It’s strongly recommended to apply styles directly at the tag level for basic sizing properties (e.g., margin, padding, width, height) to avoid design inconsistencies across the page. For other style changes, consider using the **UI Theme Designer** to ensure consistency. For details, see the [UI Theme Designer](./12-theming.md) article.
2425

2526
## Usage of CSS Shadow Parts
2627

@@ -31,7 +32,7 @@ For more complex components, the styling on the tag level is not possible, there
3132
```html
3233
<ui5-card>
3334
<ui5-card-header
34-
title-text="Quick Links"
35+
title-text="Quick Links"
3536
status="4 of 10"
3637
slot="header">
3738
</ui5-card-header>
@@ -46,7 +47,6 @@ ui5-card-header::part(status) {
4647

4748
<b>Note:</b> All available shadow parts are described in the API reference as part of the "Overview" section of each component.
4849

49-
5050
## Changing CSS Variables
5151

5252
The UI5 WebComponents leverage CSS variables, so if you inspect the elements inside the Shadow DOM, you will probably find which variable you need to change. Check the list of all [Global CSS Variables](https://github.com/SAP/theming-base-content/blob/master/content/Base/baseLib/sap_horizon/css_variables.css) that we use in the component. Altering them will change the component appearance.
@@ -63,6 +63,7 @@ ui5-button {
6363
}
6464
```
6565

66+
**Note:** Whenever possible, override CSS variables through the **UI Theme Designer**. This ensures consistent updates across all components where the variable is used, helping maintain a cohesive design. For details, see the [UI Theme Designer](./12-theming.md) article.
6667

6768
## Custom Theme Schema
6869

0 commit comments

Comments
 (0)