From bef1adfa910d4ce4a4ce443cd8cd700616be8d8a Mon Sep 17 00:00:00 2001 From: Xon <635541+Xon@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:27:42 +0800 Subject: [PATCH] Update CHANGELOG.md --- CHANGELOG.md | 1 + README.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2b8a045..8d4bec76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Bug Fixes (from 11.0.0) * Fix choice disable state wasn't considered when showing the "no choices to choose from" notice * Fix regression "no choices to choose from" notice not triggering when no selectable choices exist for select-one. [#1185](https://github.com/Choices-js/Choices/issues/1185) +* Fix regression where webpack doesn't permit importing scss/css @tagliala (#1193) ### Chore * Add e2e tests for "no choices" behavior to match v10 diff --git a/README.md b/README.md index 73078298..3ce83e6d 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,20 @@ Or include Choices directly: ``` +### CSS/SCSS + +The use of `import` of css/scss is supported from webpack. + +In .scss: +```scss +@import "choices.js/src/styles/choices"; +``` + +In .js/.ts: +```javascript +import "choices.js/public/assets/styles/choices.css"; +``` + ## Setup **Note:** If you pass a selector which targets multiple elements, the first matching element will be used. Versions prior to 8.x.x would return multiple Choices instances.