Hi Kmcnet, I think CSS isolation shall be the feature you want to use. Please feel free to let us know your detailed requirement if it doesn't solve your issue. Just like what you can see in screenshot below. By default the form elements uses the styles inherit from Layout.cshtml. To cover it, I define CSS isolation style with font color and width, then we can see the width and font color used the style we defined in CSS isolation.
But CSS isolation also has limitations. Just like what we can see in the document. When we faced the limitation, we can only add inline style like <style> .my-input{ color:blue; } </style>
in front of that cshtml file.
CSS isolation only applies to HTML elements. CSS isolation isn't supported for Tag Helpers
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Tiny