You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.
With the completion of aspnet/Razor#684TagHelpers can now determine their application on an HTML element based on an attribute name and its value.
The following CSS selector attributes were added:
[name^=value] : HTML element must have an attribute with name (case insensitive) and a value that starts withvalue (case sensitive).
[name$=value] : HTML element must have an attribute with name (case insensitive) and a value that ends withvalue (case sensitive).
[name=value] : HTML element must have an attribute with name (case insensitive) and a value that equalsvalue (case sensitive).
Full list here. We haven't added support for all of them, just the ones listed above.
Any attribute value with a dynamic value such as type="prefix @something suffix" would result in the following:
[type^=prefix] = Matches ✅
[type$=suffix] = Matches ✅
[type='prefix @something suffix'] = Does not match ❌
This is because dynamic values are treated as unmatchable pieces of an attribute value.
I've abstracted the logic for the selector matching criteria into a TagHelperDescriptors RequiredAttributes. Each RequiredAttribute is of type TagHelperRequiredAttributeDescriptor and has an IsMatch method which takes care of all of the criteria.
The text was updated successfully, but these errors were encountered:
If this issue is still a problem with the RTW release of Visual Studio 2017, please report a new issue using the Report a Problem tool. While you can still use .NET Core and ASP.NET Preview tools with Visual Studio 2015, Visual Studio 2017 is now the officially supported tool for developing .NET Core and ASP.NET Core projects.
By using the Report a Problem tool (available in both VS 2017 and VS 2015), you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See Visual Studio's Talk to Us page for more details.
Please use the discussion topic here for feedback and questions on the deprecation of this issue tracker. Thanks!
With the completion of aspnet/Razor#684
TagHelper
s can now determine their application on an HTML element based on an attribute name and its value.The following CSS selector attributes were added:
[name^=value]
: HTML element must have an attribute withname
(case insensitive) and a value that starts withvalue
(case sensitive).[name$=value]
: HTML element must have an attribute withname
(case insensitive) and a value that ends withvalue
(case sensitive).[name=value]
: HTML element must have an attribute withname
(case insensitive) and a value that equalsvalue
(case sensitive).Full list here. We haven't added support for all of them, just the ones listed above.
Any attribute value with a dynamic value such as
type="prefix @something suffix"
would result in the following:[type^=prefix]
= Matches ✅[type$=suffix]
= Matches ✅[type='prefix @something suffix']
= Does not match ❌This is because dynamic values are treated as unmatchable pieces of an attribute value.
I've abstracted the logic for the selector matching criteria into a
TagHelperDescriptor
sRequiredAttributes
. EachRequiredAttribute
is of type TagHelperRequiredAttributeDescriptor and has an IsMatch method which takes care of all of the criteria.The text was updated successfully, but these errors were encountered: