Skip to content

fix: Image size, TextInput placeholder color and disabled:, Pressable disabled: not working on web#349

Merged
Brentlok merged 2 commits intomainfrom
fix/rnw
Jan 31, 2026
Merged

fix: Image size, TextInput placeholder color and disabled:, Pressable disabled: not working on web#349
Brentlok merged 2 commits intomainfrom
fix/rnw

Conversation

@Brentlok
Copy link
Copy Markdown
Contributor

@Brentlok Brentlok commented Jan 31, 2026

fixes #346

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for styling disabled, aria-disabled, and readonly states across components
    • Enhanced placeholder text color customization for text inputs
  • Improvements

    • Improved styling precedence for width and height properties in images

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 31, 2026

📝 Walkthrough

Walkthrough

This PR implements support for the disabled style variant in Uniwind by introducing a custom CSS variant targeting disabled HTML states, narrowing data-attribute processor logic, and enhancing component-level styling for placeholder colors and image style precedence.

Changes

Cohort / File(s) Summary
CSS Variant Infrastructure
packages/uniwind/src/css/overwrite.ts, packages/uniwind/src/css/index.ts, packages/uniwind/uniwind.css
Added new disabled custom variant supporting :disabled, [aria-disabled="true"], and [readonly] selectors. Variant definition exported from new overwrite.ts module and composed into the CSS pipeline.
Component Enhancements
packages/uniwind/src/components/web/Image.tsx, packages/uniwind/src/components/web/TextInput.tsx
Image component now resolves and applies style reset for width/height based on className; TextInput component now computes placeholder text color fallback using the uniwind accent hook.
Processor Logic
packages/uniwind/src/metro/processor/processor.ts
Narrowed dataAttributes collection to strictly filter for data-\* prefixed selectors in null and equal operations, preventing non-data-\* attributes from being captured.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • feat: support data attributes #339: Directly related through data-attribute handling enhancements in the processor, complementing the existing data-attributes support infrastructure.

Poem

🐰 A disabled state, once out of reach,
Now answers to CSS's gentle teach!
With :disabled, aria, and readonly's call,
The variant variant now captures them all! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly summarizes the main changes: fixing Image size, TextInput placeholder color, and disabled variant on web components.
Linked Issues check ✅ Passed The PR addresses the core objective from issue #346 by implementing a disabled variant that works on web, with supporting fixes for Image and TextInput.
Out of Scope Changes check ✅ Passed All changes directly support the primary objective of fixing disabled styles on web: disabled variant implementation, processor narrowing for data attributes, and component fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/rnw

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Brentlok Brentlok merged commit 355007d into main Jan 31, 2026
2 checks passed
@Brentlok Brentlok deleted the fix/rnw branch January 31, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disabled style not working on pressable react native web

1 participant