trunk
trunk copied to clipboard
Remove `data-` prefix from our various Trunk attributes
Originally when I first starting building Trunk, I thought that I was going to care a lot more about having a semantic index.html
, and I perceived that others would as well.
As Trunk has grown in usage and features, having to prefix attributes of our various asset types with data-
is pretty much just an inconvenience, and doesn't matter AT ALL, given that the attributes are all removed from the final output index.html
.
This is something that we could do before we hit a v1.0
, depending on what the community thinks about this. Please let me know! Cheers
I think it's important to allow users to specify the tags they want. I.e. we should avoid namespace collisions, like someone who wants a something
attribute in their HTML would not be kept from doing so if Trunk had a data-something
attribute. But if we removed the data-
prefix, the something
attribute would get processed by Trunk rather than being kept in the output.
Maybe renaming data-
to trunk-
or even -trunk-
(like a CSS-vendor-prefix) would be an idea worth considering?
While the possibility of data-
conflicts is low, I think that's a good enough reason to move to a trunk
-specific attribute to process assets.
trunk-
works brilliantly, IMO.
I also favor trunk-
over data-
.
I too believe we should move from data
to trunk
.
Should we use
-
trunk-
or -
-trunk-
to disambiguate further? It's kind of like css vendor prefixes.
Does anyone have ideas on this issue? I'd love to hear your thoughts on this one.
I'd prefer 1.
I'd vote 1.
I support making this move, but we will just need to ensure it is backwards compatible. We update our teaching docs on the site, examples &c; however, we continue to support the old pattern until we hit 1.0 or so.
We could issue deprecation warnings from the CLI when we detect old usage and such.
Concurrence from me.
trunk-
☑️
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
This issue was closed because it has been stalled for 5 days with no activity.
???