Skip to content

Commit e7c5353

Browse files
crisbetojelbourn
authored andcommitted
docs(overlay): add note about pre-built styles (#12993)
Adds a note about the pre-built overlay styles since we have not mention of them anywhere else in the docs. Fixes #8717.
1 parent 8ee3462 commit e7c5353

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/cdk/overlay/overlay.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
The `overlay` package provides a way to open floating panels on the screen.
22

3+
### Initial setup
4+
The CDK overlays depend on a small set of structural styles to work correctly. If you're using
5+
Angular Material, these styles have been included together with the theme, otherwise if you're
6+
using the CDK on its own, you'll have to include the styles yourself. You can do so by importing
7+
the prebuilt styles in your global stylesheet:
8+
9+
```scss
10+
@import '~@angular/cdk/overlay-prebuilt.css';
11+
```
12+
313
### Creating overlays
414
Calling `overlay.create()` will return an `OverlayRef` instance. This instance is a handle for
515
managing that specific overlay.

0 commit comments

Comments
 (0)