<?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/"
	>

<channel>
	<title>Here comes the Sun &#187; css</title>
	<atom:link href="http://sunng.info/blog/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://sunng.info/blog</link>
	<description>47% users on this site use *nix</description>
	<lastBuildDate>Sat, 04 Feb 2012 13:08:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HTML5 Form in Opera 11</title>
		<link>http://sunng.info/blog/2011/01/html5-form-in-opera-11/</link>
		<comments>http://sunng.info/blog/2011/01/html5-form-in-opera-11/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 15:21:19 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[装备]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[opera]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/2011/01/html5-form-in-opera-11/</guid>
		<description><![CDATA[严格意义上我现在已经不能算是个web guy了，不过托Web开放的特性，咱也能评论一下。最近做个小的界面，考虑到要面向未来，HTML5又提供了丰富的表单增强。这些特性中，Firefox 3.6基本上还没有支持，Chromium 8.0有少部分支持，而真正支持比较完整的是Opera 11. autofocus 页面载入后自动将焦点转到某个input，就如以前的onload时候xxx.focus() required 指定某个input为必填，提交时会有validation，在Opera11里还会给你这样的警告并且禁止提交： email / url 指定某个input的特殊类型，提交时也会有对应的格式检查： 这样的提示可能满足不了你的替用户着想的产品经理，但是你清楚他帮你省了多少事情。而且，在DiveInfoHtml5里提到，iphone甚至为这个input做了优化，在软件盘上把空格键变得很小（因为输入邮件地址用不着），并且提供了一个@键；这就是工程师的用户体验啊。 placeholder 在input里显示提示文本： 注意到后面的红色星号了吗。这本来是我设计的一个workaround，既然Firefox 3都还不支持required validation，那么我们通过CSS来显示一个必填的提示： input&#91;required=&#34;required&#34;&#93;:after &#123; &#160; &#160; content: '(*)'; &#160; &#160; color: #F00; &#125; 结果这个伪类最后只有在Opera里实现了预期的效果，看在Stackoverflow上的讨论才得知input的:after和:before伪类只有Opera支持。 HTML5 Form这部分是一个真正务实的标准，你可以看到几乎每一个特性都是我们日常每时每刻都需要，几乎每个网站的JS都要实现的功能。标准是沟通上下游（浏览器和应用开发人员）的契约，一个真正反应相互需求的标准才是有实际价值的。]]></description>
			<content:encoded><![CDATA[<p>严格意义上我现在已经不能算是个web guy了，不过托Web开放的特性，咱也能评论一下。最近做个小的界面，考虑到要面向未来，HTML5又提供了丰富的表单增强。这些特性中，Firefox 3.6基本上还没有支持，Chromium 8.0有少部分支持，而真正支持比较完整的是Opera 11.</p>
<p><strong>autofocus</strong><br />
页面载入后自动将焦点转到某个input，就如以前的onload时候xxx.focus()</p>
<p><strong>required</strong><br />
指定某个input为必填，提交时会有validation，在Opera11里还会给你这样的警告并且禁止提交：<br />
<a href="http://www.flickr.com/photos/40741608@N08/5349345730/" title="Screenshot - 01122011 - 10:53:41 PM by 贝小塔, on Flickr"><img src="http://farm6.static.flickr.com/5083/5349345730_f6696fd07e.jpg" width="329" height="144" alt="Screenshot - 01122011 - 10:53:41 PM" /></a></p>
<p><strong>email / url</strong><br />
指定某个input的特殊类型，提交时也会有对应的格式检查：<br />
<a href="http://www.flickr.com/photos/40741608@N08/5348736441/" title="Screenshot - 01122011 - 10:54:41 PM by 贝小塔, on Flickr"><img src="http://farm6.static.flickr.com/5081/5348736441_78accc61ac.jpg" width="344" height="140" alt="Screenshot - 01122011 - 10:54:41 PM" /></a></p>
<p>这样的提示可能满足不了你的替用户着想的产品经理，但是你清楚他帮你省了多少事情。而且，在DiveInfoHtml5里提到，iphone甚至为这个input做了优化，在软件盘上把空格键变得很小（因为输入邮件地址用不着），并且提供了一个@键；这就是工程师的用户体验啊。</p>
<p><strong>placeholder</strong><br />
在input里显示提示文本：<br />
<a href="http://www.flickr.com/photos/40741608@N08/5349345562/" title="Screenshot - 01122011 - 10:52:18 PM by 贝小塔, on Flickr"><img src="http://farm6.static.flickr.com/5209/5349345562_d658665b92.jpg" width="441" height="63" alt="Screenshot - 01122011 - 10:52:18 PM" /></a></p>
<p>注意到后面的红色星号了吗。这本来是我设计的一个workaround，既然Firefox 3都还不支持required validation，那么我们通过CSS来显示一个必填的提示：</p>
<div class="codecolorer-container css twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">input<span style="color: #00AA00;">&#91;</span>required<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;required&quot;</span><span style="color: #00AA00;">&#93;</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'(*)'</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#F00</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></div>
<p>结果这个伪类最后只有在Opera里实现了预期的效果，看<a href="http://stackoverflow.com/questions/2587669/css-after-pseudo-element-on-input-field">在Stackoverflow上的讨论</a>才得知input的:after和:before伪类只有Opera支持。</p>
<p>HTML5 Form这部分是一个真正务实的标准，你可以看到几乎每一个特性都是我们日常每时每刻都需要，几乎每个网站的JS都要实现的功能。标准是沟通上下游（浏览器和应用开发人员）的契约，一个真正反应相互需求的标准才是有实际价值的。</p>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2011/01/html5-form-in-opera-11/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Newly designed front page</title>
		<link>http://sunng.info/blog/2010/09/newly-designed-front-page/</link>
		<comments>http://sunng.info/blog/2010/09/newly-designed-front-page/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 13:05:54 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[手艺]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/?p=663</guid>
		<description><![CDATA[The last version of my home page was initialized at 2008.9. After two years, the page is completely obsolete, some features were broken due to different reasons. (fanfou.com has been shutdown and twitter was banned). So I just bring you &#8230; <a href="http://sunng.info/blog/2010/09/newly-designed-front-page/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The last version of my home page was initialized at 2008.9. After two years, the page is completely obsolete,  some features were broken due to different reasons. (fanfou.com has been shutdown and twitter was banned).</p>
<p>So I just bring you this:<br />
<a href="http://www.flickr.com/photos/40741608@N08/4967665544/" title="screenshot_001 by 贝小塔, on Flickr"><img src="http://farm5.static.flickr.com/4124/4967665544_1b607edbf5.jpg" width="500" height="294" alt="screenshot_001" /></a></p>
<p>The page is extremely simple, without any JavaScript or image. Some CSS3 features have been applied to it, including gradient background, css border radius (also web font will be added when I find a suitable font).</p>
<p>The photo is taken at Expo, outside the  Holland Pavilion.</p>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2010/09/newly-designed-front-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A shorten url app</title>
		<link>http://sunng.info/blog/2009/09/a-shorten-url-app/</link>
		<comments>http://sunng.info/blog/2009/09/a-shorten-url-app/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 12:36:03 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[把戏]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.classicning.com/blog/?p=218</guid>
		<description><![CDATA[一不小心又是大概有一年多时间没有用过Django了。最近经常有之前部门的同事来讨论Django和Python Web开发，大概是他们用asp做的客服系统终于要换架构了。今天国庆提前放假，用了一个下午的时间重温一下。Django的Template还是相对弱一些，居然无法在template里调用model的方法。这样auth模块里判断用户登录的is_authticated()方法就不能在template里调，如此非得在view判断（Django是MTV模型，它的view即MVC里的controller），那如果是用generic_view，这个似乎就无解了？？ 贴个图。体验一下Firefox3.5开始支持的@font-face，Webkit核心和Opera浏览器都支持这个功能。不过我Ubuntu上的Midori貌似遇到Mootools就直接崩溃，看来要等到gnome2.28里epiphany了。 忘了提了，域名是我yy的，之所以有这样的效果是修改了hosts]]></description>
			<content:encoded><![CDATA[<p>一不小心又是大概有一年多时间没有用过Django了。最近经常有之前部门的同事来讨论Django和Python Web开发，大概是他们用asp做的客服系统终于要换架构了。今天国庆提前放假，用了一个下午的时间重温一下。Django的Template还是相对弱一些，居然无法在template里调用model的方法。这样auth模块里判断用户登录的is_authticated()方法就不能在template里调，如此非得在view判断（Django是MTV模型，它的view即MVC里的controller），那如果是用generic_view，这个似乎就无解了？？</p>
<p>贴个图。体验一下Firefox3.5开始支持的@font-face，Webkit核心和Opera浏览器都支持这个功能。不过我Ubuntu上的Midori貌似遇到Mootools就直接崩溃，看来要等到gnome2.28里epiphany了。<img class="alignnone" src="http://pic.yupoo.com/classicning/65666826c591/medium.jpg" alt="" width="500" height="365" /></p>
<p>忘了提了，域名是我yy的，之所以有这样的效果是修改了hosts</p>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2009/09/a-shorten-url-app/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gwibber and WebKit</title>
		<link>http://sunng.info/blog/2009/03/gwibber-and-webkit/</link>
		<comments>http://sunng.info/blog/2009/03/gwibber-and-webkit/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 10:07:29 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[手艺]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://www.classicning.com/blog/?p=31</guid>
		<description><![CDATA[Gwibber是一个用来接收流行的web2.0应用的消息的客户端。（靠，这句绝望了。）今天LinuxToy才刚刚介绍，不过我前几天就发现了，哦hohohoho。 Gwibber的架构很容易扩展，稍微看一看就清楚了，我就不描述了。正好饭否和twitter的接口是保持一致的，拷拷改改很容易就可以给Gwibber增加饭否的支持。如此一来就可以同时看饭否看twitter发饭否发twitter了。 你以为这是一张截图，其实它是分隔线。 注意上图，gwibber是一个简单的pyGtk程序加上Webkit，它的核心部分就是html网页。这个网页除了头像以外可是没有图片的，那几个效果是怎么实现的呢。一个一个说。 圆角 -webkit-border-radius: 7px; 文字阴影 text-shadow: 1px 1px black; 渐变 background:  -webkit-gradient(linear, left top, left 220%, from(rgba(254, 240, 152, 0.9)), to(black)); 比较神奇的就是这三个属性。所以也难怪现在用WebKit核心的程序（不完全是浏览器）越来越多。没有记错的话，这三个丰富特性除了text-shadow在Firefox3.1开始支持其他的Gecko都还不支持。 总而言之，用CSS就可以绘制出精致的图形，而且完全可以生长在桌面。]]></description>
			<content:encoded><![CDATA[<p>Gwibber是一个用来接收流行的web2.0应用的消息的客户端。（靠，这句绝望了。）今天LinuxToy才刚刚介绍，不过我前几天就发现了，哦hohohoho。</p>
<p>Gwibber的架构很容易扩展，稍微看一看就清楚了，我就不描述了。正好饭否和twitter的接口是保持一致的，拷拷改改很容易就可以给Gwibber增加饭否的支持。如此一来就可以同时看饭否看twitter发饭否发twitter了。</p>
<p>你以为这是一张截图，其实它是分隔线。</p>
<p><img class="alignnone" title="Gwibber with fanfou support" src="http://pic.yupoo.com/classicning/15491710661a/xaq77l24.jpg" alt="" width="338" height="528" /></p>
<p>注意上图，gwibber是一个简单的pyGtk程序加上Webkit，它的核心部分就是html网页。这个网页除了头像以外可是没有图片的，那几个效果是怎么实现的呢。一个一个说。</p>
<ul>
<li>圆角 -webkit-border-radius: 7px;</li>
<li>文字阴影 text-shadow: 1px 1px black;</li>
<li>渐变 background:  -webkit-gradient(linear, left top, left 220%, from(rgba(254, 240, 152, 0.9)), to(black));</li>
</ul>
<p>比较神奇的就是这三个属性。所以也难怪现在用WebKit核心的程序（不完全是浏览器）越来越多。没有记错的话，这三个丰富特性除了text-shadow在Firefox3.1开始支持其他的Gecko都还不支持。</p>
<p>总而言之，用CSS就可以绘制出精致的图形，而且完全可以生长在桌面。</p>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2009/03/gwibber-and-webkit/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

