Socket
Socket
Sign inDemoInstall

@tailwindcss/forms

Package Overview
Dependencies
Maintainers
4
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tailwindcss/forms - npm Package Compare versions

Comparing version 0.5.8 to 0.5.9

9

CHANGELOG.md

@@ -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

2

package.json
{
"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 @@ )}")`,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc