@tailwindcss/forms
Advanced tools
Comparing version 0.5.8 to 0.5.9
@@ -12,2 +12,8 @@ # Changelog | ||
## [0.5.9] - 2024-09-05 | ||
### Fixed | ||
- Fallback to static chevron color if theme is using variables ([#167](https://github.com/tailwindlabs/tailwindcss-forms/pull/167)) | ||
## [0.5.8] - 2024-08-28 | ||
@@ -158,3 +164,4 @@ | ||
[unreleased]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.8...HEAD | ||
[unreleased]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.9...HEAD | ||
[0.5.9]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.8...v0.5.9 | ||
[0.5.8]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.7...v0.5.8 | ||
@@ -161,0 +168,0 @@ [0.5.7]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.6...v0.5.7 |
{ | ||
"name": "@tailwindcss/forms", | ||
"version": "0.5.8", | ||
"version": "0.5.9", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "types": "src/index.d.ts", |
@@ -14,2 +14,12 @@ const svgToDataUri = require('mini-svg-data-uri') | ||
return function ({ addBase, addComponents, theme }) { | ||
function resolveChevronColor(color, fallback) { | ||
let resolved = theme(color) | ||
if (!resolved || resolved.includes('var(')) { | ||
return fallback | ||
} | ||
return resolved.replace('<alpha-value>', '1') | ||
} | ||
const strategy = options.strategy === undefined ? ['base', 'class'] : [options.strategy] | ||
@@ -157,5 +167,5 @@ | ||
'background-image': `url("${svgToDataUri( | ||
`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${resolveColor( | ||
theme('colors.gray.500', colors.gray[500]), | ||
'--tw-stroke-opacity' | ||
`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${resolveChevronColor( | ||
'colors.gray.500', | ||
colors.gray[500] | ||
)}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>` | ||
@@ -162,0 +172,0 @@ )}")`, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54060
401