skrollr icon indicating copy to clipboard operation
skrollr copied to clipboard

data-* attributes should be prefixed to avoid conflicts

Open blixt opened this issue 12 years ago • 4 comments

Since this is a very isolated feature, it should be designed in a way where it can be used with many other features made by other developers. One way to do so is to ensure that global names are namespaced. So instead of data-0 or data-end you would write something like data-skrollr-0 or data-skrollr-end.

blixt avatar Jun 17 '13 19:06 blixt

Good point, but so far nobody complaint. I'll keep this open as a feature request. A prefix option could be used which defaults to an empty string and could be set to skrollr or whatever someone wants to.

Note to self: skrollr-stylesheets would need to know about this prefix as well.

Prinzhorn avatar Jun 17 '13 20:06 Prinzhorn

I would definitely love to see this feature as well :)

Perhaps a potential conflict might arise if someone wanted to use a numerical data attribute to set font weights. I recently found that I needed to alter font-weights via the HTML markup, rather than CSS, thus I was contemplating using data attributes, but instead opted for classes.

Anyway, just thought I'd ping the thread with another interested party. It's super useful already though!!

psullivan6 avatar Sep 03 '14 23:09 psullivan6

+1

dvislov avatar Oct 30 '14 11:10 dvislov

+1!

I'd be happy to work up a PR too (for skrollr at least) if I knew it were going to be merged.

ethanresnick avatar Oct 08 '15 02:10 ethanresnick