Prinzhorn/skrollr-stylesheets

Add more details about data attribute to docs

Closed this issue · 5 comments

I was stuck on this for a bit, so I figured worth mentioning––somewhere you should write that it's required to put the data-skrollr-stylesheet attribute on the stylesheet link tag. It's just a bit confusing because it says if you want to use another one, include it separately––but when I added the attribute on my single stylesheet, it seems to work great.

Just a thought. Thanks for the awesome plugin!

It's there:

If you want skrollr-stylesheets to parse an external stylesheet (those using a link element), add an empty data-skrollr-stylesheet attribute to it.

https://github.com/Prinzhorn/skrollr-stylesheets#external-stylesheets

But I happily reduce confusion if you tell me were.

It's just a bit confusing because it says if you want to use another one, include it separately

Not sure what you mean with that part. Please quote the docs and post a link. Thanks

I guess my question for you is, when would one not be parsing an external stylesheet? Inline styles? The docs tend to read like the link href method is an alternative one, but it seems it's the only one?—
Andrew Martin
www.andrewmart.in

On Fri, Jan 10, 2014 at 8:41 AM, Alexander Prinzhorn
notifications@github.com wrote:

It's there:

If you want skrollr-stylesheets to parse an external stylesheet (those using a link element), add an empty data-skrollr-stylesheet attribute to it.
https://github.com/Prinzhorn/skrollr-stylesheets#external-stylesheets
But I happily reduce confusion if you tell me were.
It's just a bit confusing because it says if you want to use another one, include it separately

Not sure what you mean with that part. Please quote the docs and post a link. Thanks

Reply to this email directly or view it on GitHub:
#32 (comment)

I guess my question for you is, when would one not be parsing an external stylesheet?

I'm not sure what you mean. skrollr-stylesheets ignores external (<link>) stylesheets unless they have the data-skrollr-stylesheet attribute. For example you wouldn't want the Bootstrap or jQuery UI stylesheet to be searched, since there are no keyframes anyway. Internal/embedded stylesheets (<style>) are always parsed. They're usually used only in dev anyway.

Ahh, okay, this makes more sense. Thanks for the clarification. I think those notes (exactly as you have written) might be a helpful addition to the docs. —
Andrew Martin
www.andrewmart.in

On Fri, Jan 10, 2014 at 9:57 AM, Alexander Prinzhorn
notifications@github.com wrote:

I guess my question for you is, when would one not be parsing an external stylesheet?

I'm not sure what you mean. skrollr-stylesheets ignores external (<link>) stylesheets unless they have the data-skrollr-stylesheet attribute. For example you wouldn't want the Bootstrap or jQuery UI stylesheet to be searched, since there are no keyframes anyway. Internal/embedded stylesheets <style> are always parsed. They're usually used only in dev anyway.

Reply to this email directly or view it on GitHub:
#32 (comment)

check