Closed anncwb closed 2 months ago
Latest commit: 0b1f522ebcea88a165e484afda7ced52e72b6ebd
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The changes involve modifying the CSS selector for the .ant-select-selector
class to ensure that form validation error styles are applied correctly within Ant Design components, particularly when used inside Modal or Drawer contexts. The parent .ant-app
class has been removed from the selector, allowing the styling to be effective regardless of the component's nesting.
File | Change Summary |
---|---|
packages/styles/src/antd/index.css |
Modified CSS selector from .ant-app .form-valid-error .ant-select-selector to .form-valid-error .ant-select-selector to ensure styling applies outside .ant-app . |
Objective | Addressed | Explanation |
---|---|---|
Ensure validation error styles are applied in Modal/Drawer (#4449) | ✅ |
.ant-select-selector
class, relevant to the styling changes in this PR.🐇 In the garden of code, changes bloom bright,
Styles for errors now shine with delight.
No more lost borders in drawers so neat,
With CSS magic, our forms are complete!
Hooray for the fixes, let’s hop with glee,
For validation's now clear, as clear as can be! 🌼
packages/styles/src/antd/index.css (1)
`15-17`: **LGTM! The CSS selector change fixes the validation error styling issue.** The removal of the `.ant-app` parent class from the selector ensures that the validation error styles are applied consistently to the `.ant-select-selector` element within the `.form-valid-error` context, regardless of whether it is inside an `.ant-app` node or not. This change addresses the reported issue where the validation error styles were lost when Ant Design components like Select were used within Modal or Drawer components. By removing the dependency on the `.ant-app` parent class, the styles will now be applied correctly in these scenarios, providing a consistent user experience for form validation feedback across different UI contexts. Great work on identifying and fixing this styling issue! The change aligns with the PR objectives and improves the overall usability of the form components.
Description
fixed #4449
Type of change
Please delete options that are not relevant.
pnpm-lock.yaml
unless you introduce a new test example.Checklist
pnpm run docs:dev
command.pnpm test
.feat:
,fix:
,perf:
,docs:
, orchore:
.Summary by CodeRabbit