@descope/web-components-ui 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.
@@ -351,6 +351,10 @@ const injectStyle = (cssString, ref, { prepend = false } = {}) => {
351
351
  _ref.adoptedStyleSheets = adoptedStyleSheets;
352
352
  }
353
353
 
354
+ if(cssString && !style.cssRules[0]?.style){
355
+ console.warn(`No style rules were created, make sure the CSS is valid:\n "${cssString}"`);
356
+ }
357
+
354
358
  return style;
355
359
  };
356
360
 
@@ -1638,7 +1642,7 @@ const createStyleMixin$1 =
1638
1642
  if (elementId) {
1639
1643
  // basically this is enough to make the selector more specific
1640
1644
  // but just in case there is no id, we will also add the class multiple times
1641
- classSpecifier += `#${elementId}`;
1645
+ classSpecifier += `#${CSS.escape(elementId)}`;
1642
1646
  }
1643
1647
 
1644
1648
  this.#overrideStyleEle = injectStyle(`:host(${classSpecifier}) {}`, this.#rootElement);
@@ -1647,7 +1651,7 @@ const createStyleMixin$1 =
1647
1651
 
1648
1652
 
1649
1653
  #setAttrOverride(attrName, value) {
1650
- const style = this.#overrideStyleEle?.cssRules[0]?.style;
1654
+ const style = this.#overrideStyleEle.cssRules[0].style;
1651
1655
 
1652
1656
  if (!style) return;
1653
1657
 
@@ -3633,7 +3637,7 @@ const createStyleMixin =
3633
3637
  if (elementId) {
3634
3638
  // basically this is enough to make the selector more specific
3635
3639
  // but just in case there is no id, we will also add the class multiple times
3636
- classSpecifier += `#${elementId}`;
3640
+ classSpecifier += `#${CSS.escape(elementId)}`;
3637
3641
  }
3638
3642
 
3639
3643
  this.#overrideStyleEle = injectStyle(`:host(${classSpecifier}) {}`, this.#rootElement);
@@ -3641,7 +3645,7 @@ const createStyleMixin =
3641
3645
  }
3642
3646
 
3643
3647
  #setAttrOverride(attrName, value) {
3644
- const style = this.#overrideStyleEle?.cssRules[0]?.style;
3648
+ const style = this.#overrideStyleEle.cssRules[0].style;
3645
3649
 
3646
3650
  if (!style) return;
3647
3651