selectize / selectize.js

Selectize is the hybrid of a textbox and <select> box. It's jQuery based, and it has autocomplete and native-feeling keyboard navigation; useful for tagging, contact lists, etc.
https://selectize.dev/
Apache License 2.0
13.03k stars 3.58k forks source link

Import bootstrap5 scss resulting in error #2011

Open ChaerilM opened 1 year ago

ChaerilM commented 1 year ago

Welcome to the Selectize bug tracker. Thank you for taking the time to make Selectize a better library!

Please keep in mind this repository has an important issue backlog and that maintainers have limited time to fix issues, triage, and understand them.

If you've never done so, please read the guide to reporting issues in the Wiki to help us better understand your issue.

Place an x in the checklist steps ([ ] becomes [x]) to demonstrate you have done/verified all the steps you needed to do.

Thank you for reading this! You can now erase everything up to the following dashes, and then complete what's after.

ISSUES THAT EITHER:

COULD BE CLOSED.


I did:

I tried making a simple import in my scss,

@import '~@selectize/selectize/dist/scss/selectize.bootstrap5.scss';

when i compile it i got error

SassError: Can't find stylesheet to import.
  ╷
1 │ @import "lib/bootstrap5/functions";
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^

in which it should use ..\lib instead of lib, or better just go for ~bootstrap/sass/... and get the file from there.

Steps to reproduce:

  1. import bs5 css
  2. run dev

Expected result: compiled Actual result: error

kkozlik commented 1 year ago

I am facing the same issue with importing bootstrap4 scss

ChaerilM commented 1 year ago

after looking at #1614 seems need some custom bootstrap require in package.json, which i will not do. in the end, i copy the scss and make my own copy

kkozlik commented 1 year ago

My current workaround is patching the scss file with:

--- node_modules/@selectize/selectize/dist/scss/selectize.bootstrap4.orig.scss  2023-06-13 13:57:41.486247383 +0200
+++ node_modules/@selectize/selectize/dist/scss/selectize.bootstrap4.scss   2023-06-13 13:58:23.495827546 +0200
@@ -1,6 +1,6 @@
-@import "lib/bootstrap4/functions";
-@import "lib/bootstrap4/variables";
-@import "lib/bootstrap4/mixins";
+@import "../lib/bootstrap4/functions";
+@import "../lib/bootstrap4/variables";
+@import "../lib/bootstrap4/mixins";

 $enable-shadows: true !default;
 $select-font-family: inherit !default;
asuri0n commented 1 year ago

@kkozlik workaround is working but not ideal solution

@risadams

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days

kkozlik commented 11 months ago

bump

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days

kkozlik commented 6 months ago

bump

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days

kkozlik commented 2 months ago

the issue still exists