<?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>El Futirifoken &#187; css</title>
	<atom:link href="http://www.gazer.com.ar/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gazer.com.ar</link>
	<description>El arte de no decir nada ;-)</description>
	<lastBuildDate>Mon, 26 Dec 2011 19:56:05 +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>Limpiando los mails de Yahoo Groups</title>
		<link>http://www.gazer.com.ar/2009/03/16/limpiando-los-mails-de-yahoo-groups/</link>
		<comments>http://www.gazer.com.ar/2009/03/16/limpiando-los-mails-de-yahoo-groups/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 13:58:08 +0000</pubDate>
		<dc:creator>Gazer</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.gazer.com.ar/?p=1032</guid>
		<description><![CDATA[Una de las cosas más molestas que tiene Yahoo Groups es la cantidad de basura que le mete a los emails que llegan desde el grupo. Como dicen, una imagen dice más que mil palabras : Es realmente perturbante, sobre todo porque lo pone en cada email. La primer opción que busqué fue decirle a [...]]]></description>
			<content:encoded><![CDATA[<p>Una de las cosas más molestas que tiene Yahoo Groups es la cantidad de basura que le mete a los emails que llegan desde el grupo. Como dicen, una imagen dice más que mil palabras :</p>
<p><a href="http://www.gazer.com.ar/wp-content/uploads/2009/03/yahoogroups_bad.png"><img class="aligncenter size-medium wp-image-1033" title="yahoogroups_bad" src="http://www.gazer.com.ar/wp-content/uploads/2009/03/yahoogroups_bad-300x223.png" alt="" width="300" height="223" /></a></p>
<p>Es realmente perturbante, sobre todo porque lo pone en cada email. La primer opción que busqué fue decirle a Gmail que me muestre los emails como plain-text, lo que no encontré. Después recordé que como uso Gmail para trabajar, me llegan emails con links en html-only :S, por lo que de todas formas no me servía.</p>
<p>Entonces dije &#8220;no hay drama, lo modifico con <a href="https://addons.mozilla.org/en-US/firefox/addon/2108">Stylish</a>&#8220;, una extensión de Firefox que permite mediante CSS cambiar cosas (y un poco más liviana que <a href="https://addons.mozilla.org/en-US/firefox/addon/748">Greasemonkey</a>). La cosa no fue tan fácil, ya que el HTML que inserta Yahoo no tiene ni class ni id en los tags HTML, por lo que tuve que hacer un poco de magia con los CSS Selectors de Firefox, que por fortuna son varios <img src='http://www.gazer.com.ar/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>El resultado final obtenido es :</p>
<p><a href="http://www.gazer.com.ar/wp-content/uploads/2009/03/yahoogroups_good.png"><img class="aligncenter size-medium wp-image-1034" title="yahoogroups_good" src="http://www.gazer.com.ar/wp-content/uploads/2009/03/yahoogroups_good-300x96.png" alt="" width="300" height="96" /></a></p>
<p>Todavía quedan algunos detalles, como sacar una imagen de 1&#215;1 pixels al final del cuerpo que según parece usa Yahoo para geolocalizar desde donde se leen sus email.</p>
<p>El CSS aplicado :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@namespace url(http://www.w3.org/1999/xhtml);</span>
<span style="color: #a1a100;">@-moz-document domain(mail.google.com) {</span>
  <span style="color: #6666ff;">.ii</span> <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">+</span> div <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span> !important<span style="color: #00AA00;">;</span>
  <span style="color: #00AA00;">&#125;</span>
  <span style="color: #6666ff;">.ii</span> <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span> !important<span style="color: #00AA00;">;</span>
  <span style="color: #00AA00;">&#125;</span>
  <span style="color: #6666ff;">.ii</span> <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> <span style="color: #3333ff;">:first-child </span><span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">95%</span> !important<span style="color: #00AA00;">;</span>
  <span style="color: #00AA00;">&#125;</span>
  <span style="color: #6666ff;">.ii</span> <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> div <span style="color: #00AA00;">&gt;</span> <span style="color: #3333ff;">:first-child </span><span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span> !important<span style="color: #00AA00;">;</span>
  <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.gazer.com.ar/2009/03/16/limpiando-los-mails-de-yahoo-groups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Tab menú</title>
		<link>http://www.gazer.com.ar/2008/11/10/css-tab-menu/</link>
		<comments>http://www.gazer.com.ar/2008/11/10/css-tab-menu/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 13:18:49 +0000</pubDate>
		<dc:creator>Gazer</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.gazer.com.ar/?p=791</guid>
		<description><![CDATA[Trabajando en un sitio me topé con el problema de tener que implementar tabs para el menú de navegación a fin de seguir el boceto que había pasado el diseñador. El principal problema era que el tab tenía que ser auto-expandible ya que no sabemos de entrada qué textos van a ir en cada tab. [...]]]></description>
			<content:encoded><![CDATA[<p>Trabajando en un sitio me topé con el problema de tener que implementar tabs para el menú de navegación a fin de seguir el boceto que había pasado el diseñador.</p>
<p>El principal problema era que el tab tenía que ser auto-expandible ya que no sabemos de entrada qué textos van a ir en cada tab. Lo segundo que tenía que soportar es dos estados para los tabs, para poder saber cuál es el que corresponde a la página actual.</p>
<p>La solución final no es del todo ideal, ya que el texto de cada tab no puede ser arbitrariamente largo, pero en nuestro caso es por ahora lo suficiente y llegado al caso se puede extender fácilmente. Luego de trabajar un buen rato logré lo que sigue :</p>
<p><img class="aligncenter size-full wp-image-797" title="Trabajo final del tab menu" src="http://www.gazer.com.ar/wp-content/uploads/2008/11/tab_menu.png" alt="" width="481" height="94" /></p>
<p>El HTML que genera el menú incluye tanto los tabs con sus respectivos links, como la fina línea negra y naranja de abajo (que hace de cierre), quedando algo cómo :</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;ul id=&quot;navigation&quot;&gt;
  &lt;li&gt;&lt;a&gt;&lt;span&gt;Menú Item #1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a&gt;&lt;span&gt;Item #2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a&gt;&lt;span&gt;Otro Item más largo&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li class=&quot;current&quot;&gt;&lt;a&gt;&lt;span&gt;Actual&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre></div></div>

<p>Cada tab está formado por dos imágenes aplicadas mediante CSS de manera de lograr el efecto deseado. El <code>span</code> interior al anchor es necesario para hacer que sea de largo variable. No me gusta mucho usar tags como helpers de los CSS, pero muchas veces no queda opción. Las imágenes en cuestión son :</p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-800" title="menu_1_off" src="http://www.gazer.com.ar/wp-content/uploads/2008/11/menu_1_off.png" alt="" width="250" height="36" /> <img class="alignnone size-medium wp-image-801" title="menu_2_off" src="http://www.gazer.com.ar/wp-content/uploads/2008/11/menu_2_off.png" alt="" width="15" height="36" /></p>
<p>El largo de la primera imagen es lo que define el largo máximo del tab que podemos tener. Para nuestro sitio consideramos que 250px de largo era más que suficiente.</p>
<p>Yendo a los CSS, a continuación está el CSS que se aplica a la lista, definiendo la línea separadora como un background alineado al fondo y que repite horizontalmente.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">ul<span style="color: #cc00cc;">#navigation</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">9px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/menu_separator.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-x</span> <span style="color: #993333;">scroll</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">49px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>El truco para poder hacerlo extensible es usar el tag <code>span</code> para poner el cuerpo (imagen 1) y luego usar el <code>a</code> para cerrar el borde de la derecha (imagen 2)</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">ul<span style="color: #cc00cc;">#navigation</span> li a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/menu_2_off.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #993333;">scroll</span> <span style="color: #000000; font-weight: bold;">right</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">36px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span> <span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #cc00cc;">#navigation</span> li a span <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/menu_1_off.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #993333;">scroll</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">36px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0.7em</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Los tamaños, margenes y paddings son en función del tamaño de las imágenes. Para el caso del tab seleccionado solo basta cambiar los background y ajustar algún que otro color :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">ul<span style="color: #cc00cc;">#navigation</span> li<span style="color: #6666ff;">.current</span> a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/menu_2_on.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #993333;">scroll</span> <span style="color: #000000; font-weight: bold;">right</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #cc00cc;">#navigation</span> li<span style="color: #6666ff;">.current</span> a span <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/menu_1_on.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #993333;">scroll</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Para que ande en IE hay que aplicar algunos hacks específicos para que no se rompa todo, pueden hacerlo usando los <a href="http://msdn.microsoft.com/en-us/library/ms537512.aspx">include condicionales</a> :</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* IE hacks */</span>
ul<span style="color: #cc00cc;">#navigation</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #808080; font-style: italic;">/* El ancho de la barra de navegación */</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1004px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #cc00cc;">#navigation</span> li <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #cc00cc;">#navigation</span> li a span <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.gazer.com.ar/2008/11/10/css-tab-menu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

