Skip to content

Commit

Permalink
docs: replace BS with Default SlickGrid Theme
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Jan 21, 2025
1 parent 9cf960b commit 5cce598
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
7 changes: 6 additions & 1 deletion docs/getting-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,23 @@ Default compiled `css` (if you use the plain Bootstrap Theme CSS, you could simp

##### WebPack
```typescript
// Bootstrap is optional, you can use any framework
import 'bootstrap/dist/css/bootstrap.css';
import 'multiple-select-modified/src/multiple-select.css';

// if you use CSS instead of SASS
import '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-default.css';
// or other available themes
import '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-bootstrap.css';
import '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-material.css';
import '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-salesforce.css';
```

#### SASS (scss)
You could also compile the SASS files with your own customization, for that simply take any of the [_variables.scss](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/styles/_variables.scss) (without the `!default` flag) variable from the file and make sure to import the Bootstrap Theme afterward. For example, you could modify your `style.scss` with the following changes:

```scss
@use '../node_modules/@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-bootstrap.scss' with (
@use '../node_modules/@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-default.scss' with (
$cell-odd-background-color: lightyellow,
$row-mouse-hover-color: lightgreen
);
Expand Down
12 changes: 9 additions & 3 deletions docs/styling/styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ Default compiled `css` (if you use the plain Bootstrap Theme CSS, you could simp
```
##### WebPack
```typescript
// Bootstrap is optional, you can use other framework
import 'bootstrap/dist/css/bootstrap.css';

// if you use CSS instead of SASS
import '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-default.css';
// or other themes
import '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-bootstrap.css';
import '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-material.css';
import '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-salesforce.css';
```

### Using built-in Themes
Expand All @@ -28,17 +33,18 @@ The Material & Salesforce Themes are using SVGs internally for the icons used by
##### with CSS
```scss
/* style.css */
@use '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-bootstrap.css';
@use '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-default.css';

// or other Themes
@use '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-bootstrap.css';
@use '@slickgrid-universal/common/dist/styles/styles/css/slickgrid-theme-material.css';
@use '@slickgrid-universal/common/dist/styles/css/slickgrid-theme-salesforce.css';
```

##### with SASS
```scss
/* style.scss */
@use '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-bootstrap.scss' with (
@use '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-default.scss' with (
$slick-primary-color: green,
$slick-cell-odd-background-color: lightyellow,
$slick-row-mouse-hover-color: lightgreen
Expand Down Expand Up @@ -73,7 +79,7 @@ You could use Custom SVGs and create your own Theme and/or a different set of SV
$primary-color: blue;

// then on the last line, import the Theme that you wish to override
@use '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-bootstrap.scss' with (
@use '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-default.scss' with (
$slick-primary-color: $primary-color,
$slick-icon-group-color: $primary-color,
$slick-icon-group-collapsed-svg-path: "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",
Expand Down

0 comments on commit 5cce598

Please sign in to comment.