New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant attributes, except input #21

Closed
adrianiftode opened this Issue Nov 16, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@adrianiftode

adrianiftode commented Nov 16, 2016

We use some CSS selectors like input[type=text] and these won't work with RemoveRedundantAttributes since the type=text is the redundant one. I fixed this by changing the CSS, but do you plan to make these definitions configurable?

@Taritsyn

This comment has been minimized.

Owner

Taritsyn commented Nov 16, 2016

Hello, Adrian!

I think, that worth to implement this feature.

It's only a matter of time. In the near future will be a lot of work, related with the transition to .NET Core 1.1.

@Taritsyn

This comment has been minimized.

Owner

Taritsyn commented Nov 23, 2016

Hello, Adrian!

In WebMarkupMin 2.2.3 solved this problem.

In configuration settings of HTML and XHTML minifiers was added one new property - PreservableAttributeList (default is empty). PreservableAttributeList property contains a comma-separated list of string representations of attribute expressions, that define what attributes can not be removed (e.g. "form[method=get i], input[type], [xmlns]"). Attribute expressions somewhat similar to the CSS Attribute Selectors. There are six varieties of the attribute expressions:

  • [attributeName]
  • tagName[attributeName]
  • [attributeName=attributeValue]
  • tagName[attributeName=attributeValue]
  • [attributeName=attributeValue i]
  • tagName[attributeName=attributeValue i]
@adrianiftode

This comment has been minimized.

adrianiftode commented Nov 24, 2016

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment