cf-elements 1.0.5 → 1.0.6

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.
Files changed (2) hide show
  1. package/cf-elements.js +8 -6
  2. package/package.json +1 -1
package/cf-elements.js CHANGED
@@ -1054,7 +1054,8 @@
1054
1054
  * bg-style - Background image style: cover, cover-center (default), parallax, w100, w100h100, no-repeat, repeat, repeat-x, repeat-y
1055
1055
  * gradient - CSS gradient
1056
1056
  * overlay - Overlay color (rgba)
1057
- * text-color - Default text color (inherited by child elements)
1057
+ * color - Default text color (inherited by child elements)
1058
+ * text-color - Alias for color
1058
1059
  * link-color - Default link color
1059
1060
  * font - Default font family (e.g., "Roboto") - inherited by child elements
1060
1061
  * font-family - Alias for font
@@ -1070,7 +1071,8 @@
1070
1071
  const bgStyle = attr(this, "bg-style");
1071
1072
  const gradient = attr(this, "gradient");
1072
1073
  const overlay = attr(this, "overlay");
1073
- const textColor = attr(this, "text-color", "#334155");
1074
+ // Support both "color" (simple) and "text-color" (explicit) for page text color
1075
+ const textColor = attr(this, "color") || attr(this, "text-color", "#334155");
1074
1076
  const linkColor = attr(this, "link-color", "#3b82f6");
1075
1077
  // Support both "font" (simple) and "font-family" (explicit) attributes
1076
1078
  const font = attr(this, "font") || attr(this, "font-family");
@@ -1707,24 +1709,24 @@
1707
1709
  }
1708
1710
 
1709
1711
  // Build ID attribute for scroll-to and custom CSS targeting
1710
- // ID goes on col-inner so custom CSS targets the styled element, not the structural wrapper
1712
+ // ID goes on ColContainer so pagetree parser captures it correctly
1711
1713
  const idAttr = elementId ? ` id="${elementId}"` : "";
1712
1714
  const showAttr = show ? ` data-show="${show}"` : "";
1713
1715
 
1714
1716
  // Only render col-inner if there's styling, otherwise just wrap content
1715
1717
  let innerHtml;
1716
1718
  if (hasColInnerStyling) {
1717
- innerHtml = `<div${idAttr} ${dataAttrs} style="${buildStyle(
1719
+ innerHtml = `<div ${dataAttrs} style="${buildStyle(
1718
1720
  innerStyles
1719
1721
  )}">${overlayHtml}${contentHtml}</div>`;
1720
1722
  } else {
1721
- innerHtml = `<div${idAttr} class="col-inner" style="${buildStyle(
1723
+ innerHtml = `<div class="col-inner" style="${buildStyle(
1722
1724
  innerStyles
1723
1725
  )}">${contentHtml}</div>`;
1724
1726
  }
1725
1727
 
1726
1728
  this.outerHTML = `
1727
- <div data-type="ColContainer/V1" data-span="${span}" data-col-direction="${align}"${showAttr} style="${buildStyle(
1729
+ <div${idAttr} data-type="ColContainer/V1" data-span="${span}" data-col-direction="${align}"${showAttr} style="${buildStyle(
1728
1730
  colStyles
1729
1731
  )}">
1730
1732
  ${innerHtml}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cf-elements",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Zero-dependency markup library that generates ClickFunnels compatible HTML with inline styles",
5
5
  "main": "cf-elements.js",
6
6
  "browser": "cf-elements.js",