From a89e95a7a0d084200992428bbf7b5e70034b87cc Mon Sep 17 00:00:00 2001 From: Ryan Bonomo Date: Tue, 8 Jul 2025 16:29:38 -0700 Subject: [PATCH] Summary of the changes - Add CSS to VS.Web.CG.Mvc's Bootstrap 5 site.css template, to reset Bootstrap 5 input group styling, to work with hidden __Invariant field that is added by ASP tag helper for certain field types. Fixes #3170 --- .../Templates/Identity/Bootstrap5/wwwroot/css/site.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Scaffolding/VS.Web.CG.Mvc/Templates/Identity/Bootstrap5/wwwroot/css/site.css b/src/Scaffolding/VS.Web.CG.Mvc/Templates/Identity/Bootstrap5/wwwroot/css/site.css index d18b278b6..c3bae4de5 100644 --- a/src/Scaffolding/VS.Web.CG.Mvc/Templates/Identity/Bootstrap5/wwwroot/css/site.css +++ b/src/Scaffolding/VS.Web.CG.Mvc/Templates/Identity/Bootstrap5/wwwroot/css/site.css @@ -81,3 +81,13 @@ body { white-space: nowrap; line-height: 60px; } + +/* Bootstrap 5 input group reset to work with ASP Tag Helpers inserting hidden input[name="__Invariant"] elements, for certain field types, starting in .NET 7 */ +.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating) { + border-top-right-radius: var(--bs-border-radius); + border-bottom-right-radius: var(--bs-border-radius); +} +.input-group:not(.has-validation) > :not(:last-child):not(:has(+ input[type="hidden"]:last-child)):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating) { + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; +}