From f823a8c50fb4c80ca3cc56da21a2aa6d1e6ef18d Mon Sep 17 00:00:00 2001 From: Abraham Date: Wed, 10 Jan 2024 11:11:13 +0100 Subject: [PATCH] Fix `placeholder` condition in `preset-base` (#1981) --- .changeset/large-deers-move.md | 5 +++++ packages/preset-base/src/conditions.ts | 2 +- packages/studio/styled-system/types/conditions.d.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/large-deers-move.md diff --git a/.changeset/large-deers-move.md b/.changeset/large-deers-move.md new file mode 100644 index 000000000..578716c1f --- /dev/null +++ b/.changeset/large-deers-move.md @@ -0,0 +1,5 @@ +--- +'@pandacss/preset-base': patch +--- + +Fix `placeholder` condition in `preset-base` diff --git a/packages/preset-base/src/conditions.ts b/packages/preset-base/src/conditions.ts index 27fa8bb19..f67b3ad14 100644 --- a/packages/preset-base/src/conditions.ts +++ b/packages/preset-base/src/conditions.ts @@ -62,7 +62,7 @@ export const conditions = { autofill: '&:autofill', inRange: '&:in-range', outOfRange: '&:out-of-range', - placeholder: '&:is(:placeholder, [data-placeholder])', + placeholder: '&::placeholder, &[data-placeholder]', placeholderShown: '&:is(:placeholder-shown, [data-placeholder-shown])', pressed: '&:is([aria-pressed=true], [data-pressed])', selected: '&:is([aria-selected=true], [data-selected])', diff --git a/packages/studio/styled-system/types/conditions.d.ts b/packages/studio/styled-system/types/conditions.d.ts index 4433cab2a..daf75e02b 100644 --- a/packages/studio/styled-system/types/conditions.d.ts +++ b/packages/studio/styled-system/types/conditions.d.ts @@ -116,7 +116,7 @@ export interface Conditions { "_inRange": string /** `&:out-of-range` */ "_outOfRange": string - /** `&:is(:placeholder, [data-placeholder])` */ + /** `&::placeholder, &[data-placeholder]` */ "_placeholder": string /** `&:is(:placeholder-shown, [data-placeholder-shown])` */ "_placeholderShown": string