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

Import bootstrap5 scss resulting in error #2011

Open
5 tasks done
ChaerilM opened this issue May 11, 2023 · 8 comments
Open
5 tasks done

Import bootstrap5 scss resulting in error #2011

ChaerilM opened this issue May 11, 2023 · 8 comments

Comments

@ChaerilM
Copy link

ChaerilM commented May 11, 2023

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:

  • IGNORE THE ISSUE GUIDELINES
  • ERASE THE FOLLOWING TEMPLATE
  • DON'T FOLLOW THE PROPER NUMBERED FORMAT FOR STEPS TO REPRODUCE

COULD BE CLOSED.


I did:

  • Search for if my issue has already been submitted
  • Make sure I'm reporting something precise that needs to be fixed
  • Give my issue a descriptive and concise title
  • Create a minimal working example on JsFiddle or Codepen
    (or gave a link to a demo on the Selectize docs)
  • Indicate precise steps to reproduce in numbers and the result,
    like below

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
Copy link

kkozlik commented Jun 12, 2023

I am facing the same issue with importing bootstrap4 scss

@ChaerilM
Copy link
Author

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
Copy link

kkozlik commented Jun 16, 2023

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
Copy link

asuri0n commented Jun 29, 2023

@kkozlik workaround is working but not ideal solution

@risadams

Copy link
Contributor

github-actions bot commented Nov 5, 2023

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
Copy link

kkozlik commented Nov 5, 2023

bump

Copy link
Contributor

github-actions bot commented Mar 6, 2024

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
Copy link

kkozlik commented Mar 6, 2024

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants