2016-09-07, 09:48 AM
I am working on a responsive theme. When I can't find a single template that'd resize nicely both on desktop and mobile, or I want a considerably different effect, I put two alternate codes - that represent the same object, but one for desktop and one for mobile.
Example: on desktop I like my profiles big, vertical and hovering. On mobile, I want them smaller and horizontal above the post. So I do something like:
All good, except when you have some JS involved. To use our example, I noticed that the Quick Reply was broken. I moved it out of the double description above, since it was identical for both anyway.
As a result, it works but only on ONE of the two. And apparently, it depends on the one that I put first.
For instance:
means that Quick Reply will work on desktop, but not on mobile, while
works on mobile and not on desktop.
Even if I assign both repetitions to the same device (well, screen width, actually), only the first one works.
It happened with the text editor. Even without the media queries, if I posted the HTML for the textarea twice on the same template, I got two text boxes. Both allowed me to write, but only the first one had the white field and the BCC bar, while the other had only the same basic features you get on Quick Reply.
Is that normal? What is the problem?
http://silenceandwhispers.icyboards.net/
Example: on desktop I like my profiles big, vertical and hovering. On mobile, I want them smaller and horizontal above the post. So I do something like:
<div class=desktopstuff"> <codes for the vertical postbit> </div>
<div class=mobilestuff"> <codes for the horizontal postbit> </div>
All good, except when you have some JS involved. To use our example, I noticed that the Quick Reply was broken. I moved it out of the double description above, since it was identical for both anyway.
As a result, it works but only on ONE of the two. And apparently, it depends on the one that I put first.
For instance:
<div class=desktopstuff"> <codes for the vertical postbit> </div>
<div class=mobilestuff"> <codes for the horizontal postbit> </div>
<button bits>
means that Quick Reply will work on desktop, but not on mobile, while
<div class=mobilestuff"> <codes for the horizontal postbit> </div>
<div class=desktopstuff"> <codes for the vertical postbit> </div>
<button bits>
works on mobile and not on desktop.
Even if I assign both repetitions to the same device (well, screen width, actually), only the first one works.
It happened with the text editor. Even without the media queries, if I posted the HTML for the textarea twice on the same template, I got two text boxes. Both allowed me to write, but only the first one had the white field and the BCC bar, while the other had only the same basic features you get on Quick Reply.
Is that normal? What is the problem?
http://silenceandwhispers.icyboards.net/