[PR #2002] [MERGED] Form field: fix css selectors for variants #3021

Open
opened 2026-01-29 18:21:33 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/2002
Author: @Cosmatevs
Created: 2/25/2025
Status: Merged
Merged: 2/28/2025
Merged by: @yordanov

Base: masterHead: form-field-variant-spill-fix


📝 Commits (1)

  • 7e2f8ae FormField: fix css selectors for variants to avoid capturing variants of containers

📊 Changes

1 file changed (+14 additions, -20 deletions)

View changed files

📝 Radzen.Blazor/themes/components/blazor/_form-field.scss (+14 -20)

📄 Description

If a form field is a container element that has its own variant, this variant no longer affects the form field style, e.g. breaking placement of labels inside empty text areas:
misplaced textarea label
This particular issue can be seen in the demo of input types. Set the variant to outlined or text and erase the RadzenTextArea field. The label (being a placeholder now) is misplaced now because the example card uses the filled variant. And it's incorrectly picked by form field css selectors.

This pull request was originally a part of https://github.com/radzenhq/radzen-blazor/pull/1958 that contains potentially breaking changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/2002 **Author:** [@Cosmatevs](https://github.com/Cosmatevs) **Created:** 2/25/2025 **Status:** ✅ Merged **Merged:** 2/28/2025 **Merged by:** [@yordanov](https://github.com/yordanov) **Base:** `master` ← **Head:** `form-field-variant-spill-fix` --- ### 📝 Commits (1) - [`7e2f8ae`](https://github.com/radzenhq/radzen-blazor/commit/7e2f8ae06499cf24a2744c37e1d18cfd50cf2910) FormField: fix css selectors for variants to avoid capturing variants of containers ### 📊 Changes **1 file changed** (+14 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/themes/components/blazor/_form-field.scss` (+14 -20) </details> ### 📄 Description If a form field is a container element that has its own variant, this variant no longer affects the form field style, e.g. breaking placement of labels inside empty text areas: ![misplaced textarea label](https://github.com/user-attachments/assets/709bafc6-d12a-4baa-8777-adc27cf04420) This particular issue can be seen in the [demo of input types](https://blazor.radzen.com/form-field?theme=standard#input-types). Set the variant to *outlined* or *text* and erase the *RadzenTextArea* field. The label (being a placeholder now) is misplaced now because the example card uses the *filled* variant. And it's incorrectly picked by form field css selectors. This pull request was originally a part of https://github.com/radzenhq/radzen-blazor/pull/1958 that contains potentially breaking changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:21:33 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#3021