<?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#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>BlackBerry Developer Blog &#187; BlackBerry 10 browser</title>
	<atom:link href="http://devblog.blackberry.com/tag/blackberry-10-browser/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.blackberry.com</link>
	<description></description>
	<lastBuildDate>Fri, 24 May 2013 15:08:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='devblog.blackberry.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/9ef0a66c09615fa946c4179662398878?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>BlackBerry Developer Blog &#187; BlackBerry 10 browser</title>
		<link>http://devblog.blackberry.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://devblog.blackberry.com/osd.xml" title="BlackBerry Developer Blog" />
	<atom:link rel='hub' href='http://devblog.blackberry.com/?pushpress=hub'/>
		<item>
		<title>Improper use of CSS background-size</title>
		<link>http://devblog.blackberry.com/2013/01/improper-use-of-css/</link>
		<comments>http://devblog.blackberry.com/2013/01/improper-use-of-css/#comments</comments>
		<pubDate>Mon, 28 Jan 2013 16:39:23 +0000</pubDate>
		<dc:creator>Rory C-B</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 10 browser]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[sample code]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=13252</guid>
		<description><![CDATA[Order and omissions matter when it comes to CSS. Until recently there was a quirk in the WebKit rendering engine related to the shorthand background property. The good news is that it has been fixed; the bad news is that it potentially breaks legacy code. If the background-size property is set prior to declaring background [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=13252&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Order and omissions matter when it comes to CSS. Until recently there was a quirk in the WebKit rendering engine related to the shorthand background property. The good news is that it has been fixed; the bad news is that it potentially breaks legacy code. If the background-size property is set prior to declaring background property it no longer behaves in the same fashion. The simplest solution is to declare the size of a background image in the background property.</p>
<p>code:</p>
<pre>a.icon.good2 {
	background: #215387 url(test-sprite@2x.png) 4px -6px / 40px 82px no-repeat;
	}</pre>
<p>Note: Including the size in the background property is not supported in older browsers. See example 2 below for a more backwards compatible solution.</p>
<p><span id="more-13252"></span></p>
<p><strong>Issue:</strong></p>
<p>The W3C spec for the background shorthand property specifies that when declared without a size property it initializes size to &#8216;background-size: auto auto;&#8217;. Previously there was quirk with WebKit where if size was omitted it just didn&#8217;t initialize the size property for the background. This allowed for a previously declared background-size declaration to remain intact, displaying the image at its proper size. This quirk has since been removed and the latest release of WebKit now follows the W3C spec.</p>
<p><i>Bad code</i></p>
<pre>a.icon {
	background-size: 40px 82px;
	}
a.icon.bad {
	background: #215387 url(test-sprite@2x.png) 4px -6px no-repeat;
	}</pre>
<p><i>Produces</i></p>
<p><img class="alignnone size-full wp-image-13253" alt="" src="http://rimdevblog.files.wordpress.com/2013/01/impropercss.jpg?w=127&#038;h=91" width="127" height="91" /></p>
<p><strong>Solution</strong></p>
<p>1. Add size to the background short-hand property and eliminate the background-size property</p>
<p><i>Code</i></p>
<pre>a.icon.good2 {
     background: #215387 url(test-sprite@2x.png) 4px -6px / 40px 82px no-repeat;
}</pre>
<p><i>Produces</i></p>
<p><img class="alignnone size-full wp-image-13254" alt="" src="http://rimdevblog.files.wordpress.com/2013/01/impropercsspic2.jpg?w=127&#038;h=91" width="127" height="91" /></p>
<p>2. If you must resize a background-image via a background-size property declare background size after the background property so it isn&#8217;t overridden.</p>
<p>Code</p>
<pre>a.icon.good {
	background: #215387 url(test-sprite@2x.png) 4px -6px no-repeat;
	}
a.icon.good {
	background-size: 40px 82px;
	}</pre>
<p>Produces</p>
<p><img class="alignnone size-full wp-image-13255" alt="" src="http://rimdevblog.files.wordpress.com/2013/01/impropercsspic3.png?w=127&#038;h=91" width="127" height="91" /></p>
<p><strong>References:</strong></p>
<p><a href="http://www.w3.org/TR/css3-background/#the-background" target="_new">http://www.w3.org/TR/css3-background/#the-background</a><br />
<a href="https://bugs.webkit.org/show_bug.cgi?id=97761" target="_new">https://bugs.webkit.org/show_bug.cgi?id=97761</a><br />
<a href="http://lists.w3.org/Archives/Public/www-style/2012Oct/0112.html" target="_new">http://lists.w3.org/Archives/Public/www-style/2012Oct/0112.html</a><br />
<a href="http://caniuse.com/#search=background-size" target="_new">http://caniuse.com/#search=background-size</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/13252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/13252/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=13252&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2013/01/improper-use-of-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/242389c732166964f7406def92b0a476?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rcraigbarnes</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2013/01/impropercss.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2013/01/impropercsspic2.jpg" medium="image" />

		<media:content url="http://rimdevblog.files.wordpress.com/2013/01/impropercsspic3.png" medium="image" />
	</item>
		<item>
		<title>The BlackBerry 10 User Agent String Has Arrived!</title>
		<link>http://devblog.blackberry.com/2012/08/blackberry-10-user-agent-string/</link>
		<comments>http://devblog.blackberry.com/2012/08/blackberry-10-user-agent-string/#comments</comments>
		<pubDate>Thu, 16 Aug 2012 19:50:58 +0000</pubDate>
		<dc:creator>Alex Kinsella</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[BlackBerry 10]]></category>
		<category><![CDATA[BlackBerry 10 browser]]></category>
		<category><![CDATA[sample code]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[user agent]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=10780</guid>
		<description><![CDATA[Guest post from Steve W. detailing a change in our BlackBerry® 10 browser user agent &#8211; Ed. We have been busy making the BlackBerry® 10 browser one of the most advanced browsers on the market with class leading HTML5, CSS3, and WebGL support. However, even if you build one of the greatest browsers to ever [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10780&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><em>Guest post from Steve W. detailing a change in our BlackBerry® 10 browser user agent &#8211; Ed.</em></p>
<p>We have been busy making the BlackBerry® 10 browser one of the most advanced browsers on the market with class leading HTML5, CSS3, and WebGL support. However, even if you build one of the greatest browsers to ever hit the mobile web, you still need content providers to serve up a rich mobile experience. To help ensure our users receive high quality content, we have changed our user agent string. It’s not an ideal solution, but feature detection and responsive design have not yet become the norm among web designers, and we needed an interim solution.</p>
<p><span id="more-10780"></span></p>
<p style="text-align:center;"><a href="http://rimdevblog.files.wordpress.com/2012/05/bb10_devalpha2.png"><img class="aligncenter  wp-image-9144" title="bb10_devalpha2" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2012/05/bb10_devalpha2.png?w=317&#038;h=614" width="317" height="614" /></a></p>
<p>Thus, without further ado, I introduce to you the new and improved BlackBerry user agent string!</p>
<p><code>Mozilla/5.0 (BB10; &lt;Device Model&gt;) AppleWebKit/&lt;WebKit Version&gt; (KHTML, like Gecko) Version/&lt;BB Version #&gt; Mobile Safari/&lt;WebKit Version&gt;</code></p>
<p><!--more--></p>
<h3><strong>Explained</strong></h3>
<ol>
<li><code>Mozilla/5.0</code> Mostly customary, historically used to indicate Mozilla compatible browser</li>
<li><code>BB10</code> The primary identifier of a BlackBerry 10 device</li>
<li><code>&lt;Device Family&gt;</code> Device product family name</li>
<li><code>AppleWebKit/&lt;WebKit Version&gt;</code> The WebKit Version number</li>
<li><code>KHTML, like Gecko</code> The engine WebKit originated from</li>
<li><code>Version/&lt;BB Version #&gt;</code> The software version number</li>
<li><code>Mobile</code> Indicates the device is mobile; it may have a small physical screen and potentially limited bandwidth</li>
<li><code>Safari/&lt;WebKit Version&gt;</code> Mostly customary, historically used to indicate Safari-compatible browser</li>
</ol>
<h3><strong>What has changed?</strong></h3>
<ol>
<li>Many websites are filtering on the word “BlackBerry” and providing our very capable browser with the most basic of mobile web pages, while rich content is being pushed to our competitors. To avoid this pitfall, we removed the word “BlackBerry” from our user agent and replaced it with “BB10”. This change will require web administrators to add this new identifier to their user agent detecting scripts</li>
<li>We cleaned up the user agent string by removing both the locale (e.g. “en-US”) and the strong encryption indicator (e.g. “U”) [don’t worry, we still support strong encryption]</li>
</ol>
<h3><strong>Suggested Identification Pattern</strong></h3>
<ul>
<li>BlackBerry10 Smartphone: <code>'BB10' + 'Mobile'</code></li>
</ul>
<h3><strong>Example: htaccess file</strong></h3>
<pre>RewriteEngine On

RewriteCond %{HTTP_USER_AGENT} BB10.+Mobile 
RewriteRule ^$    http://www.example.com/mobile [L]</pre>
<p>So there you have it, our updated BlackBerry 10 user agent string!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/10780/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/10780/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=10780&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/08/blackberry-10-user-agent-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7d0e94a7e96e80d5911732d43f31a39c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Alex K.</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/05/bb10_devalpha2.png?w=528" medium="image">
			<media:title type="html">bb10_devalpha2</media:title>
		</media:content>
	</item>
	</channel>
</rss>
