Skip to content

Commit e815209

Browse files
authored
docs: correct developing styles section (#13032)
docs(framework): correct styling section
1 parent c864705 commit e815209

1 file changed

Lines changed: 21 additions & 15 deletions

File tree

docs/4-development/07-styling.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,14 @@ The `cssVariablesTarget` configuration in `package-scripts.cjs` determines where
146146

147147
```js
148148
// package-scripts.cjs
149+
const options = {
150+
cssVariablesTarget: "host",
151+
};
152+
153+
const scripts = getScripts(options);
154+
149155
module.exports = {
150-
build: {
151-
options: {
152-
cssVariablesTarget: "host" // or "root"
153-
}
154-
}
156+
scripts
155157
};
156158
```
157159

@@ -270,12 +272,14 @@ To write `Compact` styles and define `Compact` CSS variables, use CSS container
270272

271273
```js
272274
// package-scripts.cjs
275+
const options = {
276+
cssVariablesTarget: "host",
277+
};
278+
279+
const scripts = getScripts(options);
280+
273281
module.exports = {
274-
build: {
275-
options: {
276-
cssVariablesTarget: "host"
277-
}
278-
}
282+
scripts
279283
};
280284
```
281285

@@ -298,12 +302,14 @@ Alternatively, you can define density variables using selectors `[data-ui5-compa
298302

299303
```js
300304
// package-scripts.cjs
305+
const options = {
306+
cssVariablesTarget: "host",
307+
};
308+
309+
const scripts = getScripts(options);
310+
301311
module.exports = {
302-
build: {
303-
options: {
304-
cssVariablesTarget: "root" // or omit this configuration
305-
}
306-
}
312+
scripts
307313
};
308314
```
309315

0 commit comments

Comments
 (0)