tailwind-to-style 2.2.11 → 2.3.0

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/index.js +20 -23
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1630,34 +1630,37 @@ function generator$2i(configOptions = {}) {
1630
1630
 
1631
1631
  const { backgroundColor = {} } = theme;
1632
1632
 
1633
- const responsiveCssString = generateCssString(({ getCssByColors, isValidCssColor }) => {
1634
- const cssString = getCssByColors(
1635
- backgroundColor,
1636
- (key, value, rgbValue) => {
1637
- let rgbPropertyValue = "";
1638
- if (rgbValue) {
1639
- rgbPropertyValue = `background-color: rgba(${rgbValue}, var(--bg-opacity));`;
1640
- }
1633
+ const responsiveCssString = generateCssString(
1634
+ ({ getCssByColors, isValidCssColor }) => {
1635
+ const cssString = getCssByColors(
1636
+ backgroundColor,
1637
+ (key, value, rgbValue) => {
1638
+ let rgbPropertyValue = "";
1639
+ if (rgbValue) {
1640
+ rgbPropertyValue = `background-color: rgba(${rgbValue}, var(--bg-opacity));`;
1641
+ }
1641
1642
 
1642
- if (value === "custom_value") {
1643
- return `
1643
+ if (value === "custom_value") {
1644
+ return `
1644
1645
  ${prefix}-${key} {
1645
- ${isValidCssColor(value) ? "background-color" : "background"}: ${value};
1646
+ ${
1647
+ isValidCssColor(value) ? "background-color" : "background"
1648
+ }: ${value};
1646
1649
  }
1647
1650
  `;
1648
- }
1651
+ }
1649
1652
 
1650
- return `
1653
+ return `
1651
1654
  ${prefix}-${key} {
1652
1655
  --bg-opacity: 1;
1653
1656
  background-color: ${value};
1654
1657
  ${rgbPropertyValue}
1655
1658
  }
1656
1659
  `;
1657
- }
1658
- );
1659
- return cssString;
1660
- });
1660
+ }
1661
+ );
1662
+ return cssString;
1663
+ });
1661
1664
 
1662
1665
  return responsiveCssString;
1663
1666
  }
@@ -6319,11 +6322,5 @@ function twsx(obj) {
6319
6322
  return cssString.trim();
6320
6323
  }
6321
6324
 
6322
- const tailwindCss = {
6323
- raw: twString,
6324
- object: cssObject,
6325
- };
6326
-
6327
- exports.tailwindCss = tailwindCss;
6328
6325
  exports.tws = tws;
6329
6326
  exports.twsx = twsx;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-to-style",
3
- "version": "2.2.11",
3
+ "version": "2.3.0",
4
4
  "description": "Convert tailwind classes to inline style",
5
5
  "main": "index.js",
6
6
  "scripts": {