Skip to content
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

Deprecate DataAttr, StyleAttr, TitleAttr, FormEl #174

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

markuswustenberg
Copy link
Member

@markuswustenberg markuswustenberg commented Jun 6, 2024

This change addresses #170 by deprecating some HTML helpers in favor of using one of the styles as a main one, selected based on what I think is the main use case.

  • For Data, it's the attribute. I don't see much use of the <data> element in the wild.
  • For Style, it's the attribute. The style attribute is everywhere, the <style> element is perhaps less so (but not much). This was the hardest one to decide.
  • For Title, it's the attribute. The <title> element only shows up once per document.
  • For Form, it's the element. I haven't seen much use of the form attribute in the wild.

I know this is arguably not a "consistent" approach, but I think it makes for a much nicer API, simply because the most-used option will not be a suffixed version.

This change addresses #170 by deprecating some HTML helpers in favor of using one of the styles as a main one,
selected based on what I think is the main use case.

- For `Data`, it's the attribute. I don't see much use of the `<data>` element in the wild.
- For `Style`, it's the attribute. The `style` attribute is everywhere, the `<style>` element is perhaps less so (but not much). This was the hardest one to decide.
- For `Title`, it's the attribute. The `<title>` element only shows up once per document.
- For `Form`, it's the element. I haven't seen much use of the `data` attribute in the wild.

I know this is arguably not a "consistent" approach, but I think it makes for a much nicer API, simply because the most-used option will not be a suffixed version.
@markuswustenberg markuswustenberg merged commit 81b2d6a into main Jun 6, 2024
8 checks passed
@markuswustenberg markuswustenberg deleted the deprecate-data-style-form-title branch June 6, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant