@descope-ui/common 2.1.16 → 2.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [2.1.17](https://github.com/descope/web-components-ui/compare/web-components-ui-2.1.16...web-components-ui-2.1.17) (2025-10-20)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * issue 12430 ([#757](https://github.com/descope/web-components-ui/issues/757)) ([a8d2701](https://github.com/descope/web-components-ui/commit/a8d2701ace8ee9910d445689f5376505add76cfe))
11
+
5
12
  ## [2.1.16](https://github.com/descope/web-components-ui/compare/web-components-ui-2.1.15...web-components-ui-2.1.16) (2025-10-19)
6
13
 
7
14
  ## [2.1.15](https://github.com/descope/web-components-ui/compare/web-components-ui-2.1.14...web-components-ui-2.1.15) (2025-10-16)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope-ui/common",
3
- "version": "2.1.16",
3
+ "version": "2.1.17",
4
4
  "dependencies": {
5
5
  "element-internals-polyfill": "^1.3.9",
6
6
  "color": "^4.2.3",
@@ -126,6 +126,10 @@ export const injectStyle = (cssString, ref, { prepend = false } = {}) => {
126
126
  _ref.adoptedStyleSheets = adoptedStyleSheets;
127
127
  }
128
128
 
129
+ if(cssString && !style.cssRules[0]?.style){
130
+ console.warn(`No style rules were created, make sure the CSS is valid:\n "${cssString}"`)
131
+ }
132
+
129
133
  return style;
130
134
  };
131
135
 
@@ -108,7 +108,7 @@ export const createStyleMixin =
108
108
  if (elementId) {
109
109
  // basically this is enough to make the selector more specific
110
110
  // but just in case there is no id, we will also add the class multiple times
111
- classSpecifier += `#${elementId}`;
111
+ classSpecifier += `#${CSS.escape(elementId)}`;
112
112
  }
113
113
 
114
114
  this.#overrideStyleEle = injectStyle(`:host(${classSpecifier}) {}`, this.#rootElement);
@@ -117,7 +117,7 @@ export const createStyleMixin =
117
117
 
118
118
 
119
119
  #setAttrOverride(attrName, value) {
120
- const style = this.#overrideStyleEle?.cssRules[0]?.style;
120
+ const style = this.#overrideStyleEle.cssRules[0].style;
121
121
 
122
122
  if (!style) return;
123
123