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

918221: Added documentation for lite theme #5059

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
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
Binary file added blazor/appearance/images/bigger-theme-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions blazor/appearance/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,24 @@ The following list of themes are included in the Syncfusion Blazor components li

The Syncfusion Blazor Bootstrap Theme is designed based on Bootstrap v3, whereas the Bootsrap4 theme is designed based on Bootstrap v4.

## Optimized CSS files

Syncfusion Blazor Themes have two size modes for each theme: **normal** and **bigger**. By default, the **normal** size mode is applied, offering a standard appearance that is suitable for all devices. The **bigger** size mode provides an enlarged interface for enhanced interactions, visibility, and an overall improved user experience by increasing the size of the UI controls.

The **bigger** size mode is ideal when an enlarged appearance is needed, while the normal size mode works best for maintaining the default appearance of controls.

Comparison of the Syncfusion Blazor Button Component in **normal** and **bigger** size modes:

![bigger-sized-button](./images/bigger-theme-button.png)

Each theme includes both **normal** and **bigger** size modes, which increases the overall file size. To optimize performance, Syncfusion offers additional theme files (e.g., `fluent2-lite.css`), which only include the normal size mode styles. This results in a significant reduction in file size, improving load times and overall application performance, especially when the bigger size mode is unnecessary.

Refer to the comparison below for the default and optimized theme file sizes:

| Theme Name | Default Theme Size | Optimized Theme Size |
| -- | -- | -- |
| Fluent 2 | 3.97 MB | 2.96 MB |

## Reference themes in Blazor application

Syncfusion Blazor themes can be used in your Blazor application by referencing the style sheet.
Expand Down Expand Up @@ -78,6 +96,13 @@ When using individual NuGet packages in your application, add [Syncfusion.Blazor
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" />
</head>
```
To refer to optimized CSS files, use the following syntax:

```html
<head>
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.lite.css" rel="stylesheet" />
</head>
```

When using [Syncfusion.Blazor](https://www.nuget.org/packages/Syncfusion.Blazor/) NuGet package,

Expand All @@ -86,6 +111,13 @@ When using [Syncfusion.Blazor](https://www.nuget.org/packages/Syncfusion.Blazor/
<link href="_content/Syncfusion.Blazor/styles/bootstrap5.css" rel="stylesheet" />
</head>
```
To reference optimized CSS files from [Syncfusion.Blazor](https://www.nuget.org/packages/Syncfusion.Blazor/) NuGet package, here's how to:

```html
<head>
<link href="_content/Syncfusion.Blazor/styles/bootstrap5.lite.css" rel="stylesheet" />
</head>
```

## CDN reference

Expand All @@ -99,6 +131,14 @@ Syncfusion Blazor Themes are available in the CDN. Make sure that the version in
</head>
```

To refer to optimized CSS files, use the following syntax:

```html
<head>
<link href="https://cdn.syncfusion.com/blazor/{{ site.blazorversion }}/styles/<theme_name>-lite.css" rel="stylesheet"/>
</head>
```

| Theme Name | CDN Reference |
|--- | --- |
| Material 3 | https://cdn.syncfusion.com/blazor/{{ site.blazorversion }}/styles/material3.css |
Expand Down