-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Create a <link /> Tag Helper with support for fallback sources #1580
Comments
- Core functionality works, need to add property value checks, tests, etc. - TagHelperSample.Web updated to use layout pages & link tag helper to demo loading a CSS file - TagHelperSample.Web updated to use error page & static files so "k web" works properly - #1580
- Core functionality works, need to add property value checks, tests, etc. - TagHelperSample.Web updated to use layout pages & link tag helper to demo loading a CSS file - TagHelperSample.Web updated to use error page & static files so "k web" works properly - #1580
- Core functionality works, need to add property value checks, tests, etc. - TagHelperSample.Web updated to use layout pages & link tag helper to demo loading a CSS file - TagHelperSample.Web updated to use error page & static files so "k web" works properly - #1580
- Configured console logging in TagHelperSample.Web - Changed xproj back to kproj - #1580
Sorry to comment on an old/closed issue. Was there ever any discussion for an option to test .css files that do not have singular classes? Two examples:
|
@kylef000 that's interesting, I'm not sure how one would even test for that in a generic way like we do using the injected |
@DamianEdwards Ah, alright. I didn't see much in the way of questions regarding this in my cursory search on the matter, so it may not be something that is worth investing time into. Probably the best way around this is to fork, add a test class (like Thank you for the response. Really appreciate your work on all things C#! |
This is the CSS stylesheet equivalent of #1576
A
LinkTagHelper
that allows specification of a fallback stylesheet to load in the case the primary fails to load. The failure is determined by way of injecting a dummy<meta>
tag with a specified class name (asp-fallback-test-class
attribute) and then testing the computed style of that element to see if a specified CSS property (asp-fallback-test-property
attribute) is equal to a specified value (asp-fallback-test-value
).Usage
All the attributes are required to be present and non-null for the Tag Helper to operate. If any are missing, it will log a warning and no-op.
Arguments
string
href
attribute)string
string
string
Example
Source CSHTML
Output HTML
The text was updated successfully, but these errors were encountered: