Skip to content

Commit

Permalink
fix(styling): properly import Vanilla-Calendar CSS and only once (#1492)
Browse files Browse the repository at this point in the history
* fix(styling): properly import Vanilla-Calendar CSS and only once
- we should have only 1 import and for it to be properly imported in SASS, we need to remove the file externsion when importing
- fixes invalid import and missing CSS when tested in Salesforce
  • Loading branch information
ghiscoding committed Apr 29, 2024
1 parent 240cbd3 commit 75dce74
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion examples/vite-demo-vanilla-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"moment-tiny": "^2.30.3",
"multiple-select-vanilla": "^3.1.0",
"rxjs": "^7.8.1",
"vanilla-calendar-picker": "^2.11.2",
"vanilla-calendar-picker": "^2.11.4",
"whatwg-fetch": "^3.6.20"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.7.1",
"vanilla-calendar-picker": "^2.11.2",
"vanilla-calendar-picker": "^2.11.4",
"whatwg-fetch": "^3.6.20"
},
"funding": {
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"multiple-select-vanilla": "^3.1.0",
"sortablejs": "^1.15.2",
"un-flatten-tree": "^2.0.12",
"vanilla-calendar-picker": "^2.11.2"
"vanilla-calendar-picker": "^2.11.4"
},
"devDependencies": {
"autoprefixer": "^10.4.19",
Expand Down
3 changes: 3 additions & 0 deletions packages/common/src/styles/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// import external lib CSS files (without the .css extension)
@import 'vanilla-calendar-picker/build/vanilla-calendar.min';

/*
* SlickGrid-Universal theming variables, used by all Themes
* Lib Website (https://github.com/ghiscoding/slickgrid-universal)
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/styles/slickgrid-theme-bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* @author: Ghislain B. (ghiscoding)
*/

/** SlickGrid Bootstrap Theme */
@import 'vanilla-calendar-picker/build/vanilla-calendar.min.css';
/** SlickGrid Bootstrap Theme */
@import './slick-grid';
@import './slick-editors';
@import './slick-plugins';
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/styles/slickgrid-theme-material.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* sames as `slickgrid-theme-material.lite.scss` but includes all external 3rd party lib styling
*/

@import 'vanilla-calendar-picker/build/vanilla-calendar.min.css';
@import './roboto-font';
@import './variables-theme-material';
@import './slick-without-bootstrap-min-styling';
Expand Down
2 changes: 0 additions & 2 deletions packages/common/src/styles/slickgrid-theme-salesforce.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
*/

@import './sass-utilities';
@import 'vanilla-calendar-picker/build/vanilla-calendar.min.css';

@import './variables-theme-salesforce';
@import './slick-without-bootstrap-min-styling';
@import './slick-grid';
Expand Down
2 changes: 1 addition & 1 deletion packages/vanilla-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@slickgrid-universal/utils": "workspace:~",
"dequal": "^2.0.3",
"sortablejs": "^1.15.2",
"vanilla-calendar-picker": "^2.11.2",
"vanilla-calendar-picker": "^2.11.4",
"whatwg-fetch": "^3.6.20"
},
"devDependencies": {
Expand Down
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 75dce74

Please sign in to comment.