Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded docusaurus to latest version and updated custom overlay doc #554

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading