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

Migrate Bootstrap theme to modern syntax #5191

Merged
merged 6 commits into from
Oct 31, 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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 11 additions & 20 deletions packages/bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ and then import it in your project styles:

```scss
// Import the entire theme
@import "~@progress/kendo-theme-bootstrap/dist/all.scss";
@use "@progress/kendo-theme-bootstrap/scss/all.scss" as *;
```

For more information on how to implement the Bootstrap theme in your project, refer to the following articles:
Expand All @@ -46,12 +46,14 @@ You can customize Kendo UI Bootstrap Theme both in terms of what gets compiled a

### Importing

In your custom scss file, you can import the entirety of the theme, by importing `dist/all.scss` or pick just the styles for the components you need. The files for individual components are in `scss/` folder:
In your custom scss file, you can import the entirety of the theme, by importing `scss/all.scss` or pick just the styles for the components you need. The files for individual components:

```scss
// Import only PanelBar and Grid styles
@import "~@progress/kendo-theme-bootstrap/scss/panelbar/_index.scss";
@import "~@progress/kendo-theme-bootstrap/scss/grid/_index.scss";
// Import only Button and Grid styles
@use "@progress/kendo-theme-bootstrap/scss/index.scss" as *;

@include kendo-button--styles();
@include kendo-grid--styles();
```

### SCSS Variables
Expand All @@ -65,21 +67,10 @@ We have more than 2000 variables, so it's hard to list them all. We've tried to
Here is a quick example on how to customize:

```scss
// Make all inputs components with a different background color
$input-bg: #f0f0f0;

// Make the border of the grid black and slightly ticker
$grid-border-width: 2px;
$grid-border: #000000;

// When you are finished with your customization, import the theme
@import "@progress/kendo-theme-bootstrap/dist/all.scss";

// Note: the variables bellow this point will not take effect,
// because the theme is already imported

$grid-border: red;

@use "@progress/kendo-theme-bootstrap/scss/all.scss" as * with (
$kendo-button-bg: #ff0000,
$kendo-font-size: 20px
);
```

## Integrating with third party frameworks
Expand Down
62 changes: 4 additions & 58 deletions packages/bootstrap/lib/swatches/bootstrap-3-dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"product": "kendo",
"base": "@progress/kendo-theme-bootstrap",
"version": "5.1.2-dev.7",
"api": "modern",
"previewColors": [
"#000000",
"#222222",
Expand All @@ -29,7 +30,7 @@
"app-surface": {
"name": "App Surface",
"type": "color",
"value": "#000000"
"value": "#212529"
},
"on-app-surface": {
"name": "On App Surface",
Expand Down Expand Up @@ -611,7 +612,7 @@
"type": "color",
"value": "#eca9a7"
}
}
}
},
{
"name": "Theme colors",
Expand Down Expand Up @@ -674,7 +675,7 @@
"kendo-disabled-text": {
"name": "Disabled text color",
"type": "color",
"value": "#aaaaaa"
"value": null
}
}
},
Expand Down Expand Up @@ -794,61 +795,6 @@
"value": "#d9534f"
}
}
},
{
"hidden": true,
"variables": {
"primary": {
"name": "Override bootstrap primary",
"type": "variable",
"value": "$kendo-color-primary"
},
"gray-100": {
"name": "Gray 100",
"type": "color",
"value": "#f5f5f5"
},
"gray-200": {
"name": "Gray 200",
"type": "color",
"value": "#eeeeee"
},
"gray-300": {
"name": "Gray 300",
"type": "color",
"value": "#dddddd"
},
"gray-400": {
"name": "Gray 400",
"type": "color",
"value": "#cccccc"
},
"gray-500": {
"name": "Gray 500",
"type": "color",
"value": "#aaaaaa"
},
"gray-600": {
"name": "Gray 600",
"type": "color",
"value": "#777777"
},
"gray-700": {
"name": "Gray 700",
"type": "color",
"value": "#555555"
},
"gray-800": {
"name": "Gray 800",
"type": "color",
"value": "#333333"
},
"gray-900": {
"name": "Gray 900",
"type": "color",
"value": "#222222"
}
}
}
]
}
60 changes: 3 additions & 57 deletions packages/bootstrap/lib/swatches/bootstrap-3.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"product": "kendo",
"base": "@progress/kendo-theme-bootstrap",
"version": "5.1.2-dev.7",
"api": "modern",
"previewColors": [
"#ffffff",
"#f5f5f5",
Expand Down Expand Up @@ -551,7 +552,7 @@
"type": "color",
"value": "#eca9a7"
}
}
}
},
{
"name": "Theme colors",
Expand Down Expand Up @@ -614,7 +615,7 @@
"kendo-disabled-text": {
"name": "Disabled text color",
"type": "color",
"value": "#777777"
"value": null
}
}
},
Expand Down Expand Up @@ -734,61 +735,6 @@
"value": "#d9534f"
}
}
},
{
"hidden": true,
"variables": {
"primary": {
"name": "Override bootstrap primary",
"type": "variable",
"value": "$kendo-color-primary"
},
"gray-100": {
"name": "Gray 100",
"type": "color",
"value": "#f5f5f5"
},
"gray-200": {
"name": "Gray 200",
"type": "color",
"value": "#eeeeee"
},
"gray-300": {
"name": "Gray 300",
"type": "color",
"value": "#dddddd"
},
"gray-400": {
"name": "Gray 400",
"type": "color",
"value": "#cccccc"
},
"gray-500": {
"name": "Gray 500",
"type": "color",
"value": "#aaaaaa"
},
"gray-600": {
"name": "Gray 600",
"type": "color",
"value": "#777777"
},
"gray-700": {
"name": "Gray 700",
"type": "color",
"value": "#555555"
},
"gray-800": {
"name": "Gray 800",
"type": "color",
"value": "#333333"
},
"gray-900": {
"name": "Gray 900",
"type": "color",
"value": "#222222"
}
}
}
]
}
17 changes: 4 additions & 13 deletions packages/bootstrap/lib/swatches/bootstrap-4-dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"product": "kendo",
"base": "@progress/kendo-theme-bootstrap",
"version": "5.1.2-dev.7",
"api": "modern",
"previewColors": [
"#000000",
"#212529",
Expand All @@ -29,7 +30,7 @@
"app-surface": {
"name": "App Surface",
"type": "color",
"value": "#000000"
"value": "#212529"
},
"on-app-surface": {
"name": "On App Surface",
Expand Down Expand Up @@ -611,7 +612,7 @@
"type": "color",
"value": "#eca9a7"
}
}
}
},
{
"name": "Theme colors",
Expand Down Expand Up @@ -674,7 +675,7 @@
"kendo-disabled-text": {
"name": "Disabled text color",
"type": "color",
"value": "#aaaaaa"
"value": null
}
}
},
Expand Down Expand Up @@ -787,16 +788,6 @@
"value": "#d9534f"
}
}
},
{
"hidden": true,
"variables": {
"primary": {
"name": "Override bootstrap primary",
"type": "variable",
"value": "$kendo-color-primary"
}
}
}
]
}
15 changes: 3 additions & 12 deletions packages/bootstrap/lib/swatches/bootstrap-4.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"product": "kendo",
"base": "@progress/kendo-theme-bootstrap",
"version": "5.1.2-dev.7",
"api": "modern",
"previewColors": [
"#ffffff",
"#f8f9fa",
Expand Down Expand Up @@ -551,7 +552,7 @@
"type": "color",
"value": "#eca9a7"
}
}
}
},
{
"name": "Theme colors",
Expand Down Expand Up @@ -614,7 +615,7 @@
"kendo-disabled-text": {
"name": "Disabled text color",
"type": "color",
"value": "#8f8f8f"
"value": null
}
}
},
Expand Down Expand Up @@ -727,16 +728,6 @@
"value": "#d9534f"
}
}
},
{
"hidden": true,
"variables": {
"primary": {
"name": "Override bootstrap primary",
"type": "variable",
"value": "$kendo-color-primary"
}
}
}
]
}
3 changes: 2 additions & 1 deletion packages/bootstrap/lib/swatches/bootstrap-dataviz-v4.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"product": "kendo",
"base": "@progress/kendo-theme-bootstrap",
"version": "5.1.2-dev.7",
"api": "modern",
"previewColors": [
"#0275d8",
"#5bc0de",
Expand Down Expand Up @@ -176,7 +177,7 @@
"type": "color",
"value": "#eca9a7"
}
}
}
},
{
"name": "Dataviz",
Expand Down
Loading