Skip to content

Commit

Permalink
Update documentation with example of media features
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwass-lr committed Oct 1, 2024
1 parent dc12f78 commit fd2d6a4
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ Browsershot::url('https://example.com')
->savePdf($pathToPdf);
```

You can also emulate [media features](https://www.w3.org/TR/mediaqueries-5/), such as dark mode or reduced motion.

```php
Browsershot::url('https://example.com')
->emulateMediaFeatures([
['name' => 'prefers-color-scheme', 'value' => 'dark']
])
->save($pathToImage);
```

0 comments on commit fd2d6a4

Please sign in to comment.