You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/uui-css/README.md
+111-2Lines changed: 111 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,12 @@ UUI-CSS package contains css files which can be included in your project or comp
6
6
7
7
-**custom-properties.css** — use this if you like to include our custom properties in your project.
8
8
-**uui-font.css** — use this if you like to import our font in your project. You must set the `uui-font` class on your root element.
9
-
-**uui-text.css** — use this if you like to declare styles for typography, this is needed when using ex.: H1 in a Shadow DOM. You must set the `uui-text` class in your root element.
9
+
-**uui-text.css** — use this if you like to declare styles for typography for tags such as h1, h2. This is used in companionship with `uui-font`. Set the `uui-text` class on the element covering the scope of interest, this can be your root element. And if you want to use the styling inside a Shadow dom, that will have to have the `uui-text` class as well. See Applying the uui-css styling in the root.
10
+
[See examples](#Usage)
10
11
11
12
Bundle:
12
13
13
-
-**uui-css.css** — If you like your project to be styled for Umbraco UI, then include this in the root of your project. This contains all the previous files, so make sure to only include this file in your project if you need to style your project.
14
+
-**uui-css.css** — If you like your project to be styled for Umbraco UI, then include this in the root of your project. This contains all the previous files, so make sure to only include this file in your project if you need to style your project. You will still have to apply the `uui-font` and `uui-text` classes.
14
15
15
16
### See it in action
16
17
@@ -59,3 +60,111 @@ Or you can just import the compiled bundle at once:
59
60
// app.ts
60
61
import'@umbraco-ui/uui-css/dist/uui-css.css';
61
62
```
63
+
64
+
### Applying the uui-css styling in the root
65
+
66
+
Using the `uui-font` and `uui-text`
67
+
68
+
```html
69
+
<bodyclass="uui-font uui-text">
70
+
<divid="app">
71
+
<h1>Hello uui-css!</h1>
72
+
<p>
73
+
Everything inside my app will now use the font from uui-font and tag
74
+
styling from uui-text because the root(body) has the uui-font and uui-text
0 commit comments