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: docs/handling-uploads-with-media-library-pro/customizing-css.md
+24-3Lines changed: 24 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ In this video, you'll see the various option on how to customize the look and fe
13
13
14
14
Want to see more videos like this? Check out our [free video course on how to use Laravel Media Library](https://spatie.be/videos/discovering-laravel-media-library).
15
15
16
-
## Option 1: Use your own Tailwind CSS configuration
16
+
###Option 1: Use your own Tailwind CSS configuration
17
17
18
18
Instead of importing/linking the pre-built `dist/styles.css` from the package, you can import the `src/styles.css` and run every `@apply` rule through your own `tailwind.config.js`.
19
19
@@ -33,7 +33,7 @@ Instead of importing/linking the pre-built `dist/styles.css` from the package, y
33
33
34
34
This is exactly what happens in the header of the homepage at [medialibrary.pro](https://medialibrary.pro): the shown component has a slightly blue-ish look, using the color palette of this site.
35
35
36
-
## Option 2: Override only portions in your CSS
36
+
###Option 2: Override only portions in your CSS
37
37
38
38
If you only want to tinker with certain aspects of the component but like to keep the CSS in sync with future package updates, nothing stops you from overriding only certain CSS rules with your own tweaks. Every DOM-element of the component has a class with prefix `media-library`.
39
39
@@ -53,7 +53,7 @@ Inspect the component in your browser to find out that the thumbnail is rendered
53
53
54
54
```
55
55
56
-
## Option 3: Copy the CSS to your own project
56
+
###Option 3: Copy the CSS to your own project
57
57
58
58
If you want to go full-option, you can always copy `src/styles.css` to your own project and go wild.
59
59
In this example we renamed the file to `custom/media-library.css`.
@@ -91,3 +91,24 @@ If you're using PurgeCSS, you might have to add a rule to your whitelist pattern
0 commit comments