<?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>Carlos Guedes &#187; CSS</title>
	<atom:link href="http://cguedes.wordpress.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://cguedes.wordpress.com</link>
	<description>{Abstraction is selective ignorance}</description>
	<lastBuildDate>Tue, 22 Sep 2009 16:56:38 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>pt</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='cguedes.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/fad21a367c7f771fd65e4aea84b5bb69?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Carlos Guedes &#187; CSS</title>
		<link>http://cguedes.wordpress.com</link>
	</image>
			<item>
		<title>Cascading Style Sheets, level 2 (CSS2)</title>
		<link>http://cguedes.wordpress.com/2005/02/22/cascading-style-sheets-level-2-css2/</link>
		<comments>http://cguedes.wordpress.com/2005/02/22/cascading-style-sheets-level-2-css2/#comments</comments>
		<pubDate>Tue, 22 Feb 2005 21:59:00 +0000</pubDate>
		<dc:creator>Carlos Guedes</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://cguedes.wordpress.com/2005/02/22/cascading-style-sheets-level-2-css2/</guid>
		<description><![CDATA[Durante os testes a este novo sistema de weblogs deparei-me com algo &#8220;estranho&#8221; que fez ver que não percebo nada de CSS  . Vou já mostrar o que vi&#8230;.
  p + p {   text-indent:12px; } body &#62; div {   background-color:#CCC; }
Estão a ver&#8230;. quantos de vós é que conhecem [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cguedes.wordpress.com&blog=2272045&post=30&subd=cguedes&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span class="Apple-style-span" style="font-family:Tahoma;font-size:13px;">Durante os testes a este novo sistema de weblogs deparei-me com algo &#8220;estranho&#8221; que fez ver que não percebo nada de CSS <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> . Vou já mostrar o que vi&#8230;.
<pre class="source">  p + p {   text-indent:12px; } body &gt; div {   background-color:#CCC; }</pre>
<p>Estão a ver&#8230;. quantos de vós é que conhecem esta sintaxe? <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Eu fiquei baralhado, a pensar que eram mais umas sintaxes malucas que ferramentas como o FP e IE utilizam, mas não&#8230;. <b>é CSS</b>.<br />Bem, estive a investigar um bocado sobre <a href="http://www.w3.org/TR/REC-CSS2/">este assunto</a> e descobri esta tabela sobre os<a href="http://www.w3.org/TR/REC-CSS2/selector.html"><em>selectors</em></a>.</p>
<table class="smallTable" style="font-size:12px;border-color:rgb(204,204,204);border-style:solid;border-width:1px;">
<tbody>
<tr>
<th>Pattern</th>
<th>Meaning</th>
<th>Described in section</th>
</tr>
<tr>
<td>*</td>
<td>Matches any element.</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#universal-selector">Universal selector</a></td>
</tr>
<tr>
<td>E</td>
<td>Matches any E element (i.e., an element of type E).</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#type-selectors">Type selectors</a></td>
</tr>
<tr>
<td>E F</td>
<td>Matches any F element that is a descendant of an E element.</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#descendant-selectors">Descendant selectors</a></td>
</tr>
<tr>
<td>E &gt; F</td>
<td>Matches any F element that is a child of an element E.</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#child-selectors">Child selectors</a></td>
</tr>
<tr>
<td>E:first-child</td>
<td>Matches element E when E is the first child of its parent.</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#first-child">The :first-child pseudo-class</a></td>
</tr>
<tr>
<td>E:link<br />E:visited</td>
<td>Matches element E if E is the source anchor of a hyperlink of which the target is not yet visited (:link) or already visited (:visited).</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#link-pseudo-classes">The link pseudo-classes</a></td>
</tr>
<tr>
<td>E:active<br />E:hover<br />E:focus</td>
<td>Matches E during certain user actions.</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#dynamic-pseudo-classes">The dynamic pseudo-classes</a></td>
</tr>
<tr>
<td>E:lang(c)</td>
<td>Matches element of type E if it is in (human) language c (the document language specifies how language is determined).</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#lang">The :lang() pseudo-class</a></td>
</tr>
<tr>
<td>E + F</td>
<td>Matches any F element immediately preceded by an element E.</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#adjacent-selectors">Adjacent selectors</a></td>
</tr>
<tr>
<td>E[foo]</td>
<td>Matches any E element with the &#8220;foo&#8221; attribute set (whatever the value).</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors">Attribute selectors</a></td>
</tr>
<tr>
<td>E[foo="warning"]</td>
<td>Matches any E element whose &#8220;foo&#8221; attribute value is exactly equal to &#8220;warning&#8221;.</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors">Attribute selectors</a></td>
</tr>
<tr>
<td>E[foo~="warning"]</td>
<td>Matches any E element whose &#8220;foo&#8221; attribute value is a list of space-separated values, one of which is exactly equal to &#8220;warning&#8221;.</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors">Attribute selectors</a></td>
</tr>
<tr>
<td>E[lang|="en"]</td>
<td>Matches any E element whose &#8220;lang&#8221; attribute has a hyphen-separated list of values beginning (from the left) with &#8220;en&#8221;.</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors">Attribute selectors</a></td>
</tr>
<tr>
<td>DIV.warning</td>
<td><em>HTML only</em>. The same as DIV[class~="warning"].</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#class-html">Class selectors</a></td>
</tr>
<tr>
<td>E#myid</td>
<td>Matches any E element ID equal to &#8220;myid&#8221;.</td>
<td><a class="external" target="externalcss" href="http://www.w3.org/TR/REC-CSS2/selector.html#id-selectors">ID selectors</a></td>
</tr>
</tbody>
</table>
<p>Depois disto, e de acordo com os exemplos <a class="external" target="external" href="http://www.w3.org/TR/REC-CSS2/selector.html">apresentados na especificação</a>, aprendi que podemos definir coisas como:</p>
<p><b>Child selectors</b>
<pre class="source">  BODY &gt; P { line-height: 1.3 }</pre>
<p>Neste exemplo, a regra aplica o estilo a todos os elementos P que são filhos do BODY.
<pre class="source">  DIV OL&gt;LI P { line-height: 1.3 }</pre>
<p>Neste exemplo, a regra é aplicada aos elementos P que são descendentes de LI; o elemento LI tem que ser filho de um OL; e o elemento OL tem que ser descendente de um DIV. </p>
<p><b>Adjacent sibling selectors</b>
<pre class="source">  H1 + H2 { margin-top: -5mm }</pre>
<p>Os selectores deste tipo têm a sintaxe E1 + E2. O selector é aplicado quando os elementos E1 e E2 partilham o mesmo pai e quando o E1 precede imediatamente o E2. No exemplo apresentado, está-se a reduzir o espaçamento vertical que separa um H1 de um H2 que o segue. </p>
<p>Bem, vou ficar por aqui. Para mais informações consultem o documento da <a class="external" target="external" href="http://www.w3.org/TR/REC-CSS2/">especificação</a>. </p>
<p><b>PS:</b> Já que estamos a falar de CSS não posso deixar de recordar o site do <a class="external" target="_external" href="http://www.csszengarden.com/">Zen Garden</a> que, para mim, é um hino às CSS.</span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/cguedes.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/cguedes.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cguedes.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cguedes.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cguedes.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cguedes.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cguedes.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cguedes.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cguedes.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cguedes.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cguedes.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cguedes.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cguedes.wordpress.com&blog=2272045&post=30&subd=cguedes&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://cguedes.wordpress.com/2005/02/22/cascading-style-sheets-level-2-css2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a41abb7ba6113d46b4711ade3ff9c518?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cguedes</media:title>
		</media:content>
	</item>
	</channel>
</rss>