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

Default img src = null #25

Open
Jakobud opened this issue Jun 24, 2013 · 5 comments
Open

Default img src = null #25

Jakobud opened this issue Jun 24, 2013 · 5 comments

Comments

@Jakobud
Copy link

Jakobud commented Jun 24, 2013

Take a look at the following:

http://jsfiddle.net/N2Mtj/

Why does the default img src become null in the DOM when it needs to be shown?

@ryanve
Copy link
Owner

ryanve commented Jun 27, 2013

jsfiddle.net/zmU9n/12/ shows this issue in the console. Locally I was able to trace the issue to something that changed between 0.7.1 and 0.7.2. Revert to 0.7.1 until we fix this. Thanks for reporting this. I'm surprised no one else ran into it.

@Jakobud
Copy link
Author

Jakobud commented Jun 27, 2013

I don't know if it's related, but it appears that if I try to use multiple prefixes in the setup, it ignores all the prefixes except for the last one specified.

@ryanve
Copy link
Owner

ryanve commented Jun 27, 2013

It is. The issue only occurs when aliases (extra prefixes) are specified. Removing the aliases solves it.
/13 and (better) /15 both work. The extra keys are throwing off the array containing the associated values.

@Jakobud
Copy link
Author

Jakobud commented Jun 27, 2013

Ah okay. I was trying to debug it but couldn't figure it out.

What exactly is the point of specifying multiple prefixes? If I'm simply using pixels as my breakpoints, I can use any prefix I want right? The really isn't a different between min-width- and r or some other random prefix is there?

@ryanve
Copy link
Owner

ryanve commented Jun 27, 2013

Correct—you can use any prefix you want, and you only need one. The aliases were added in 0.3 to accomodate back-compat. with earlier versions. They add flexibility but are best to avoid when possible. Modes are autodetected since 0.3 by a private function called detectMode. The defaults like "min-width-" and "min-device-width-" are readable. Something non-descriptive like "r" is useful if experimenting between using "width" and "device-width".

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

No branches or pull requests

2 participants