TagHelpers.MergeStylesheetsTagHelper Class
Namespace: Nucleus.ViewFeatures.TagHelpers
Assembly: Nucleus.ViewFeatures.dll
Tag Helper used to merge multiple CSS stylesheet <link> tags into a single "merged" tag, which is handled by the MergedFileProvider. A single <MergeLinks> can wrap all of your link elements. The MergeLinksTagHelper will merge <link> tags with the same path - it will generate separate <link> tags for each path in order to preserve relative paths within your CSS files.
Internal Use
The merge stylesheets tag helper is for internal use. It is not intended for use by Nucleus extensions. Extensions should use the AddStyle Html helper to add stylesheets to page output. Scripts added with
AddStyle are automatically merged, if your site is configured to merge stylesheets.
Constructor
Nucleus.ViewFeatures.TagHelpers.MergeStylesheetsTagHelper
Constructor
Nucleus.ViewFeatures.TagHelpers.MergeStylesheetsTagHelper (IOptions<ResourceFileOptions> options, ILogger<MergeStylesheetsTagHelper> Logger)
Constructor
Parameters
Name |
Type |
options
|
Microsoft.Extensions.Options.IOptions<Nucleus.Abstractions.Models.Configuration.ResourceFileOptions>
|
Logger
|
Microsoft.Extensions.Logging.ILogger<Nucleus.ViewFeatures.TagHelpers.MergeStylesheetsTagHelper>
|
Properties
ViewContext
Property
Provides access to view context.
Methods
ProcessAsync
(TagHelperContext,TagHelperOutput) Method
ProcessAsync (TagHelperContext context, TagHelperOutput output)
Merge style sheets.