You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So the standard way of using data- attributes is to have them as all lower case and separated by dashes. By using data-scrollReveal, this plugin breaks convention. This also has practical implications. The html5 api for interacting with data attributes specifies that while dataset keys can be camelCase, they are transformed to dash case before being selection. For example:
As such, where camelCase can and should be used with dataset selections in the javascript, the html data attribute should be dash cased. Alternately, if you wanted to keep scrollReveal as a single word, if you drop the camelCase, you can use data-scrollreveal instead.
The text was updated successfully, but these errors were encountered:
So the standard way of using
data-
attributes is to have them as all lower case and separated by dashes. By usingdata-scrollReveal
, this plugin breaks convention. This also has practical implications. The html5 api for interacting with data attributes specifies that while dataset keys can be camelCase, they are transformed to dash case before being selection. For example:...results in the following in the html:
As such, where camelCase can and should be used with
dataset
selections in the javascript, the html data attribute should be dash cased. Alternately, if you wanted to keepscrollReveal
as a single word, if you drop the camelCase, you can usedata-scrollreveal
instead.The text was updated successfully, but these errors were encountered: