Skip to content

Commit

Permalink
Upgraded docusaurus to latest version and updated custom overlay doc (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissainty authored Feb 19, 2024
1 parent 195942e commit ccba267
Show file tree
Hide file tree
Showing 5 changed files with 14,297 additions and 10,811 deletions.
8 changes: 4 additions & 4 deletions docs/docs/styling/custom-overlay.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ sidebar_position: 4
---

# Custom Overlay
The overlay can be customised by providing one or more custom CSS classes to augment or overwrite the default style.
The overlay can be customised by providing one or more custom CSS classes to augment or overwrite the default style. Note that you may need to add the `!important` keyword to some properties due the the use of scoped CSS, which can create a higher specificity for the default styles.

If you wanted the overlay to be a transparent red you could define the following CSS class.
The following example shows how to define a CSS class that overrides the default overlay background colour.

```css title="my-app.css"
.custom-modal-overlay {
background-color: rgba(255, 0, 0, 0.5);
background-color: rgba(255, 0, 0, 0.5) !important;
}
```

Then apply that to your modal with either of the following options.
This can then be applied to your modal with either of the following options.

#### Configuring for all modals
```razor
Expand Down
7 changes: 3 additions & 4 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
import {themes as prismThemes} from 'prism-react-renderer';

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down Expand Up @@ -90,8 +89,8 @@ const config = {
copyright: `Copyright © ${new Date().getFullYear()} Blazored`,
},
prism: {
theme: require('prism-react-renderer/themes/github'),
darkTheme: require('prism-react-renderer/themes/vsDark'),
theme: prismThemes.github,
darkTheme: prismThemes.vsDark,
additionalLanguages: ['csharp', 'cshtml']
},
}),
Expand Down
Loading

0 comments on commit ccba267

Please sign in to comment.