<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>animation Archives - rweber.net</title>
	<atom:link href="https://www.rweber.net/tag/animation/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.rweber.net/tag/animation/</link>
	<description>trying to be a mile wide AND a mile deep</description>
	<lastBuildDate>Sat, 16 Dec 2017 01:58:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">37896774</site>	<item>
		<title>Playing odd-browser-out</title>
		<link>https://www.rweber.net/css/playing-odd-browser/</link>
					<comments>https://www.rweber.net/css/playing-odd-browser/#respond</comments>
		
		<dc:creator><![CDATA[Rebecca]]></dc:creator>
		<pubDate>Mon, 16 Oct 2017 12:00:01 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[website layout]]></category>
		<guid isPermaLink="false">http://www.rweber.net/?p=40090</guid>

					<description><![CDATA[<div><img width="300" height="200" src="https://www.rweber.net/wp-content/uploads/2017/09/geese-1829941_640-300x200.jpg" class="attachment-medium size-medium wp-post-image" alt="Photo of five waterfowl by Luzap on Pixabay" style="float:left; margin-right:16px; margin-bottom:16px;" decoding="async" fetchpriority="high" srcset="https://www.rweber.net/wp-content/uploads/2017/09/geese-1829941_640-300x200.jpg 300w, https://www.rweber.net/wp-content/uploads/2017/09/geese-1829941_640-150x100.jpg 150w, https://www.rweber.net/wp-content/uploads/2017/09/geese-1829941_640.jpg 640w" sizes="(max-width: 300px) 100vw, 300px" /></div>
<p>Different browsers act differently with regards to both CSS and JS, but sometimes most are in agreement and one sticks out. Here are a few examples I've come across that stood out.</p>
<p>The post <a href="https://www.rweber.net/css/playing-odd-browser/">Playing odd-browser-out</a> appeared first on <a href="https://www.rweber.net">rweber.net</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img width="300" height="200" src="https://www.rweber.net/wp-content/uploads/2017/09/geese-1829941_640-300x200.jpg" class="attachment-medium size-medium wp-post-image" alt="Photo of five waterfowl by Luzap on Pixabay" style="float:left; margin-right:16px; margin-bottom:16px;" decoding="async" srcset="https://www.rweber.net/wp-content/uploads/2017/09/geese-1829941_640-300x200.jpg 300w, https://www.rweber.net/wp-content/uploads/2017/09/geese-1829941_640-150x100.jpg 150w, https://www.rweber.net/wp-content/uploads/2017/09/geese-1829941_640.jpg 640w" sizes="(max-width: 300px) 100vw, 300px" /></div><p>&#8220;Cross-browser compatibility&#8221; is a term for a reason; different browsers act differently in both styling and function. Starting out I had in my mind that Internet Explorer was the pain in the neck, but once you get to version 10 that&#8217;s not true. Here are a few things I&#8217;ve run across where one browser (or OS, in one case) does things differently &#8211; annoyingly so &#8211; from everyone else.</p>
<h3>1. Firefox and ordered lists</h3>
<p>We wanted numbered list elements with block-displayed links inside, as the Q of an FAQ. The calculation of 100% width for the block element in FF didn&#8217;t allow room for the item numbers &#8211; unlike in Safari, Chrome, and IE/Edge &#8211; so we had unwanted line breaks. There was no cross-browser-compatible way to reduce the width, say, and still get the clean look we wanted (with expansion carets aligned at the right end of each line). Ultimately we took off the built-in numbers and added our own to the links as pseudoelements. Silly.</p>
<h3>2. iOS Safari and click handlers</h3>
<p>This one I am surprised I did not learn about earlier. Anything that is not natively clickable (buttons and links) cannot be made clickable (tappable) in Safari on iOS without shenanigans. I read a number of things that talked about it being an event bubbling problem, but attaching the handler directly to the element involved didn&#8217;t fix anything; neither did setting <code>cursor: pointer;</code> in the CSS, another trick I read about. Ultimately I had to add <code>onclick="void(0)"</code> as an attribute to the elements I wanted clickable.</p>
<h3>3. Windows and font height</h3>
<p>This one&#8217;s not browser-based &#8211; you can use Chrome on different OSes and get different results. Windows and Mac don&#8217;t approach font height the same way, and unless the vertical metrics of your font cause the calculations to agree, vertical alignment across browsers may be impossible without JavaScript. The JavaScript in question is adding a class based on the User Agent:</p>
<p><code>var usrAgt = window.navigator.userAgent;<br />
if (usrAgt.indexOf("Windows") > -1) {<br />
    // add a class to style on Windows differently from Mac, Android, iOS<br />
}</code></p>
<p>Android and iOS seem to vertically align things in agreement with Mac. I was a sad panda to have to do OS sniffing, but boy was it ugly without.</p>
<h3>4. Safari and animation trailers</h3>
<p>Safari still has a nice CSS animation repainting bug that was supposedly fixed several versions ago &#8211; it may leave a little trail of the back edge of your moving element. Setting <code>outline: 1px solid transparent;</code> on the moving element will force repainting to happen on a broad-enough area to fix that.</p>
<h3>5. Actually Safari, you&#8217;re kind of a pain</h3>
<p>Positioning defaults for Safari are apparently different from other browsers; if you absolutely position an item you&#8217;d better explicitly relatively position its container. Inline-block items are not necessarily in line with their predecessors on the line, either &#8211; I had an inline-block element after a block element (that didn&#8217;t fill the width of the container), and the inline-block&#8217;s top was aligned to the block&#8217;s bottom until I set <code>vertical-align: top;</code> on it. No positioning or alignment changes were necessary to make things show up correctly in other browsers.</p>
<hr>
<p><small>Photo by <a href="https://pixabay.com/en/geese-swimming-ocean-sea-nature-1829941/">Luzap via Pizabay</a>.</small></p>
<p>The post <a href="https://www.rweber.net/css/playing-odd-browser/">Playing odd-browser-out</a> appeared first on <a href="https://www.rweber.net">rweber.net</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.rweber.net/css/playing-odd-browser/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">40090</post-id>	</item>
		<item>
		<title>Feedable Fish</title>
		<link>https://www.rweber.net/projects/feedable-fish/</link>
					<comments>https://www.rweber.net/projects/feedable-fish/#respond</comments>
		
		<dc:creator><![CDATA[Rebecca]]></dc:creator>
		<pubDate>Mon, 16 Jan 2017 13:00:06 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[fishpond]]></category>
		<category><![CDATA[portfolio]]></category>
		<guid isPermaLink="false">http://www.rweber.net/?p=40023</guid>

					<description><![CDATA[<div><img width="300" height="186" src="https://www.rweber.net/wp-content/uploads/2016/12/feeding-fish-300x186.jpg" class="attachment-medium size-medium wp-post-image" alt="animated fish feeding" style="float:left; margin-right:16px; margin-bottom:16px;" decoding="async" srcset="https://www.rweber.net/wp-content/uploads/2016/12/feeding-fish-300x186.jpg 300w, https://www.rweber.net/wp-content/uploads/2016/12/feeding-fish-768x476.jpg 768w, https://www.rweber.net/wp-content/uploads/2016/12/feeding-fish-150x93.jpg 150w, https://www.rweber.net/wp-content/uploads/2016/12/feeding-fish.jpg 956w" sizes="(max-width: 300px) 100vw, 300px" /></div>
<p>Feedable fish who are somewhat attracted to your mouse pointer, now here and <a href="https://github.com/ReveWeber/fishpond-experiments">on Github</a>.</p>
<p>The post <a href="https://www.rweber.net/projects/feedable-fish/">Feedable Fish</a> appeared first on <a href="https://www.rweber.net">rweber.net</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img width="300" height="186" src="https://www.rweber.net/wp-content/uploads/2016/12/feeding-fish-300x186.jpg" class="attachment-medium size-medium wp-post-image" alt="animated fish feeding" style="float:left; margin-right:16px; margin-bottom:16px;" decoding="async" loading="lazy" srcset="https://www.rweber.net/wp-content/uploads/2016/12/feeding-fish-300x186.jpg 300w, https://www.rweber.net/wp-content/uploads/2016/12/feeding-fish-768x476.jpg 768w, https://www.rweber.net/wp-content/uploads/2016/12/feeding-fish-150x93.jpg 150w, https://www.rweber.net/wp-content/uploads/2016/12/feeding-fish.jpg 956w" sizes="auto, (max-width: 300px) 100vw, 300px" /></div><p>More progress on <a href="https://www.rweber.net/web-development/javascript/here-fishy-fishy/">the fishpond</a>! The fish are slightly attracted to the mouse pointer when it&#8217;s inside the canvas, and you can click to feed them, which attracts them more. They also got a tiny upgrade in attractiveness. They&#8217;re still twitchy and awkward but I have various thoughts on how to improve that situation.</p>
<p><canvas id="myCanvas" width="480" height="320" style="background: radial-gradient(#94daff, #dbf3ff); display: block; margin: 0 auto;">[Visit my blog to see the fish in action]</canvas></p>
<p><script src="/wp-content/uploads/2017/01/fishpond2.js"></script></p>
<p>Code for this is <a href="https://github.com/ReveWeber/fishpond-experiments">on Github</a>.</p>
<p>The post <a href="https://www.rweber.net/projects/feedable-fish/">Feedable Fish</a> appeared first on <a href="https://www.rweber.net">rweber.net</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.rweber.net/projects/feedable-fish/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">40023</post-id>	</item>
		<item>
		<title>Here fishy fishy</title>
		<link>https://www.rweber.net/projects/here-fishy-fishy/</link>
					<comments>https://www.rweber.net/projects/here-fishy-fishy/#respond</comments>
		
		<dc:creator><![CDATA[Rebecca]]></dc:creator>
		<pubDate>Mon, 30 May 2016 12:00:02 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[fishpond]]></category>
		<guid isPermaLink="false">http://www.rweber.net/?p=39895</guid>

					<description><![CDATA[<div><img width="300" height="200" src="https://www.rweber.net/wp-content/uploads/2016/05/fishpond1-300x200.png" class="attachment-medium size-medium wp-post-image" alt="screenshot of my JS/canvas fishpond" style="float:left; margin-right:16px; margin-bottom:16px;" decoding="async" loading="lazy" srcset="https://www.rweber.net/wp-content/uploads/2016/05/fishpond1-300x200.png 300w, https://www.rweber.net/wp-content/uploads/2016/05/fishpond1-768x513.png 768w, https://www.rweber.net/wp-content/uploads/2016/05/fishpond1-150x100.png 150w, https://www.rweber.net/wp-content/uploads/2016/05/fishpond1.png 964w" sizes="auto, (max-width: 300px) 100vw, 300px" /></div>
<p>I'm working on my fishpond! With JavaScript and the HTML5 canvas element. Here's my first solid attempt.</p>
<p>The post <a href="https://www.rweber.net/projects/here-fishy-fishy/">Here fishy fishy</a> appeared first on <a href="https://www.rweber.net">rweber.net</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img width="300" height="200" src="https://www.rweber.net/wp-content/uploads/2016/05/fishpond1-300x200.png" class="attachment-medium size-medium wp-post-image" alt="screenshot of my JS/canvas fishpond" style="float:left; margin-right:16px; margin-bottom:16px;" decoding="async" loading="lazy" srcset="https://www.rweber.net/wp-content/uploads/2016/05/fishpond1-300x200.png 300w, https://www.rweber.net/wp-content/uploads/2016/05/fishpond1-768x513.png 768w, https://www.rweber.net/wp-content/uploads/2016/05/fishpond1-150x100.png 150w, https://www.rweber.net/wp-content/uploads/2016/05/fishpond1.png 964w" sizes="auto, (max-width: 300px) 100vw, 300px" /></div><p>I love <a href="http://abowman.com/google-modules/fish/">aBowman&#8217;s fish gadget</a>, but it&#8217;s Flash, which seems to be more restricted every year. Nowadays it won&#8217;t even run for longer than a minute or so without clicking a play button.</p>
<p>Recreating an interactive fishpond with HTML, CSS, and JavaScript seemed like an excellent way to learn the associated skills. I started with <a href="https://developer.mozilla.org/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScript">MDN&#8217;s JS/canvas Breakout tutorial</a> and then made the ball more interesting, and then plural. Here&#8217;s what I have so far:</p>
<p><canvas id="myCanvas" width="480" height="320" style="background: radial-gradient(#94daff, #dbf3ff); display: block; margin: 0 auto;">[Visit my blog to see the fish in action]</canvas></p>
<p><script src="/wp-content/uploads/2016/05/fishpond1.js"></script></p>
<p>This came together amazingly fast, but I expect every additional improvement will take longer than the last &#8211; more natural movement and appearance in particular. It has been a highly enjoyable challenge so far, though.</p>
<p>You can monitor the progress and grab this and other code on <a href="https://github.com/ReveWeber/fishpond-experiments">my GitHub</a>. I can&#8217;t improve on the MDN tutorial, so (for now at least) I&#8217;ll just be showing results.</p>
<p>The post <a href="https://www.rweber.net/projects/here-fishy-fishy/">Here fishy fishy</a> appeared first on <a href="https://www.rweber.net">rweber.net</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.rweber.net/projects/here-fishy-fishy/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">39895</post-id>	</item>
	</channel>
</rss>
