<?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>cakebaker &#187; css</title>
	<atom:link href="http://cakebaker.42dh.com/tags/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Tue, 20 Dec 2011 15:29:40 +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>Sassy CSS</title>
		<link>http://cakebaker.42dh.com/2010/05/08/sassy-css/</link>
		<comments>http://cakebaker.42dh.com/2010/05/08/sassy-css/#comments</comments>
		<pubDate>Sat, 08 May 2010 13:13:11 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=1398</guid>
		<description><![CDATA[Those who follow me on Twitter probably know about my love-hate relationship with CSS. To ease the pain of working with CSS I switched to Compass, a stylesheet authoring framework. With Compass, you write the stylesheets in Sass (Syntactically Awesome Stylesheets) instead of CSS. Sass is basically CSS without brackets and semicolons, as you can [...]]]></description>
			<content:encoded><![CDATA[<p>Those who follow me on Twitter probably know about my love-hate relationship with CSS. To ease the pain of working with CSS I switched to <a href="http://compass-style.org/">Compass</a>, a stylesheet authoring framework. With Compass, you write the stylesheets in <a href="http://sass-lang.com/">Sass</a> (Syntactically Awesome Stylesheets) instead of CSS. Sass is basically CSS without brackets and semicolons, as you can see in this example from the Sass website:</p>
<pre>
<code>h1
  height: 118px
  margin-top: 1em

.tagline
  font-size: 26px
  text-align: right</code>
</pre>
<p>However, with the upcoming Sass 3 (it is planned to be released on May 10, 2010) a new format gets introduced: SCSS (Sassy CSS). It is a superset of CSS, i.e. each CSS file is automatically a SCSS file (you simply have to change the file extension from &#8220;css&#8221; to &#8220;scss&#8221;). So the example from above in SCSS is just plain CSS:</p>
<pre>
<code>h1 {
  height: 118px;
  margin-top: 1em;
}

.tagline {
  font-size: 26px;
  text-align: right;
}</code>
</pre>
<p>Not that exciting, isn&#8217;t it? </p>
<p>Where SCSS shines is when it comes to the integration of the Sass features (nesting, variables, and mixins) into this format. The devs did a very good job to make it feel like those features are native CSS. </p>
<p>Let&#8217;s have a look at some examples.</p>
<p>Nesting:</p>
<pre>
<code>#header {
  background: gray;
  a {
    background: white;
    color: black;
  }
}</code>
</pre>
<p>Variables:</p>
<pre>
<code>$background_color: gray;

#header {
  background: $background_color;
}</code>
</pre>
<p>Mixins:</p>
<pre>
<code>@mixin red_border($border_width) {
  border: $border_width solid red;
}

#box_a {
  @include red_border(5px);
}

#box_b {
  @include red_border(10px);
}</code>
</pre>
<p>Personally I really like the new SCSS format, and I can only recommend to try it out for yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2010/05/08/sassy-css/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Link-like buttons</title>
		<link>http://cakebaker.42dh.com/2009/11/20/link-like-buttons/</link>
		<comments>http://cakebaker.42dh.com/2009/11/20/link-like-buttons/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 08:05:37 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=1293</guid>
		<description><![CDATA[Sometimes you want to make a button look like a link. For example, in an admin interface you might want to have &#8220;links&#8221; to edit and delete articles. The &#8220;edit&#8221; link will be a normal link. But for the &#8220;delete&#8221; link you &#8220;cannot&#8221; use a normal link, because a delete action changes the state on [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want to make a button look like a link. For example, in an admin interface you might want to have &#8220;links&#8221; to edit and delete articles. The &#8220;edit&#8221; link will be a normal link. But for the &#8220;delete&#8221; link you &#8220;cannot&#8221; use a normal link, because a delete action changes the state on the server and hence it should be performed using POST. Therefore the need for a button.</p>
<p>Thanks to CSS it should be easy to make a button look like a link, that&#8217;s what I thought when I started. But as usual when I work with CSS, what seems to be easy is not that easy&#8230; Anyway, here is the solution:</p>
<p>First the HTML code. Nothing special here, the only thing to note is that I had to use a &#8220;button&#8221; instead of an &#8220;input&#8221; element due to some CSS issues with <a href="http://www.konqueror.org/">Konqueror</a>. </p>
<pre>
<code>&lt;form action="/article/1" method="post"&gt;
  &lt;p&gt;
    &lt;button type="submit" class="link"&gt;&lt;span&gt;Delete&lt;/span&gt;&lt;/button&gt;
  &lt;/p&gt;
&lt;/form&gt;</code>
</pre>
<p>And here the CSS (thanks to Natalie Downe for her article <a href="http://natbat.net/2009/Jun/10/styling-buttons-as-links/">Styling buttons to look like links</a>, from where I got some of the settings below): </p>
<pre>
<code>button.link {
  -moz-user-select: text;
  background: none;
  border: none;
  cursor: pointer;
  color: blue;
  font-size: 1em;
  margin: 0;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  overflow: visible;
  width: auto;
}</code>
</pre>
<p>This worked fine in Konqueror, but in Firefox there was always a padding of 2px. And of course I had no clue why. As you can see in the CSS snippet above, the padding was already set to 0&#8230; Fortunately, I found the solution in a <a href="http://natbat.net/2009/Jun/10/styling-buttons-as-links/#c5551">comment</a> of the aformentioned article:</p>
<pre>
<code>button::-moz-focus-inner {
  padding: 0;
  border: none;
}</code>
</pre>
<p>To use such link-like buttons in your own application you have to adapt the CSS to your own needs.</p>
<p>Have fun :)</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2009/11/20/link-like-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faster CSS development with the blueprint framework</title>
		<link>http://cakebaker.42dh.com/2007/08/13/faster-css-development-with-the-blueprint-framework/</link>
		<comments>http://cakebaker.42dh.com/2007/08/13/faster-css-development-with-the-blueprint-framework/#comments</comments>
		<pubDate>Mon, 13 Aug 2007 14:45:33 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/08/13/faster-css-development-with-the-blueprint-framework/</guid>
		<description><![CDATA[If I have to work with CSS, it is often a struggle for me and takes a lot of time. And so I always wondered if there is not a better way to work with CSS&#8230; Fortunately, some days ago a CSS framework called blueprint has been released. It defines sensible default values and provides [...]]]></description>
			<content:encoded><![CDATA[<p>If I have to work with CSS, it is often a struggle for me and takes a lot of time. And so I always wondered if there is not a better way to work with CSS&#8230;</p>
<p>Fortunately, some days ago a CSS framework called <a href="http://code.google.com/p/blueprintcss/">blueprint</a> has been released. It defines sensible default values and provides a grid to make layouting a breeze. </p>
<p>I don&#8217;t have used it for a complex layout yet, but creating a simple two-column layout with a header and a footer was pretty simple:</p>
<pre>
&lt;div class="container"&gt;
    &lt;div class="column span-14"&gt;
        &lt;h1&gt;Title&lt;/h1&gt;
    &lt;/div&gt;
    &lt;div class="column span-4 first"&gt;
        sidebar
    &lt;/div&gt;
    &lt;div class="column span-10 last"&gt;
        content
    &lt;/div&gt;
    &lt;div class="column span-14"&gt;
        footer
    &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>I didn&#8217;t had to write any CSS myself for this example. The only thing I had to do was to include the blueprint CSS file with:</p>
<pre>
// screen.css is located in app/webroot/css
echo $html-&gt;css('screen');
</pre>
<p>I think with having such a framework, the days of writing all CSS myself are gone ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2007/08/13/faster-css-development-with-the-blueprint-framework/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Referencing CSS files</title>
		<link>http://cakebaker.42dh.com/2007/03/14/referencing-css-files/</link>
		<comments>http://cakebaker.42dh.com/2007/03/14/referencing-css-files/#comments</comments>
		<pubDate>Wed, 14 Mar 2007 10:42:55 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/03/14/referencing-css-files/</guid>
		<description><![CDATA[Some time ago I wrote a post titled &#8220;Referencing Javascript files&#8221; in which I explained how you can reference Javascript files. Now I noticed that the same approach also can be used for CSS files. For this purpose an additional parameter was added to the css() function in the HtmlHelper in CakePHP 1.2. So to [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I wrote a post titled <a href="http://cakebaker.42dh.com/2007/02/21/referencing-javascript-files/">&#8220;Referencing Javascript files&#8221;</a> in which I explained how you can reference Javascript files.</p>
<p>Now I noticed that the same approach also can be used for CSS files. For this purpose an additional parameter was added to the css() function in the HtmlHelper in CakePHP 1.2. So to load a page-specific CSS file you can add the following code to your view (notice the fourth parameter):</p>
<pre>
$html-&gt;css('page_specific', null, null, false);
</pre>
<p>Or if you want to load multiple CSS files:</p>
<pre>
$html-&gt;css(array('first', 'second'), null, null, false);
</pre>
<p>To make those snippets work you must have the variable $scripts_for_layout in your layout:</p>
<pre>
&lt;head&gt;
    &lt;?php echo $scripts_for_layout; ?&gt;
&lt;/head&gt;
</pre>
<p>It is the same variable used in the approach to reference Javascript files.</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2007/03/14/referencing-css-files/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Do we really need HTML and CSS on the web?</title>
		<link>http://cakebaker.42dh.com/2006/10/07/do-we-really-need-html-and-css-on-the-web/</link>
		<comments>http://cakebaker.42dh.com/2006/10/07/do-we-really-need-html-and-css-on-the-web/#comments</comments>
		<pubDate>Sat, 07 Oct 2006 15:42:37 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ideas]]></category>

		<guid isPermaLink="false">http://cakebaker.42dh.com/2006/10/07/do-we-really-need-html-and-css-on-the-web/</guid>
		<description><![CDATA[A provocative question, I know. But I like to try to get to the bottom of something from time to time, and to give my fancy full scope ;-) Let&#8217;s start with another question: what do we do on the web? We read news, we compare prices, we buy products, we learn, we look at [...]]]></description>
			<content:encoded><![CDATA[<p>A provocative question, I know. But I like to try to get to the bottom of something from time to time, and to give my fancy full scope ;-)</p>
<p>Let&#8217;s start with another question: what do we do on the web? We read news, we compare prices, we buy products, we learn, we look at pictures, etc., in short we are interested in content. Content is king. So the design of the sites is not that important. Of course it is more pleasant if a site has a nice design, but that&#8217;s not the reason a site is visited. It&#8217;s because of its content. </p>
<p>So we can say the web is about content. Ok. But HTML and CSS are primary for design purposes. Hm. Could it be that HTML and CSS are a wrong solution for websites? It is possible. There are some indicators for that:</p>
<ul>
<li>HTML and CSS are (too) complex, which makes it difficult for non-technical people to create websites</li>
<li>too much time must be invested to make a website look correct in the different browsers</li>
<li>extra work is needed if a website should be accessible for disabled people</li>
</ul>
<p>What could be an alternative? I think an alternative approach should be similar to plain-text email, with no possibilities to format anything. So it would be really easy to create content, just open an editor and start writing (like writing an email). And you would no longer have to worry about the different browsers, because the content is shown in the way it was entered, with just one font and one font size&#8230;</p>
<p>What do you think about this topic?</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2006/10/07/do-we-really-need-html-and-css-on-the-web/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>CSSplay</title>
		<link>http://cakebaker.42dh.com/2006/08/24/cssplay/</link>
		<comments>http://cakebaker.42dh.com/2006/08/24/cssplay/#comments</comments>
		<pubDate>Thu, 24 Aug 2006 09:26:29 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=250</guid>
		<description><![CDATA[An interesting site: CSSplay provides a lot of examples of what can be done with CSS. It is impressive what can be done with CSS (especially for someone like me who often struggles with CSS *g*).]]></description>
			<content:encoded><![CDATA[<p>An interesting site: <a href="http://www.cssplay.co.uk">CSSplay</a> provides a lot of examples of what can be done with CSS. It is impressive what can be done with CSS (especially for someone like me who often struggles with CSS *g*). </p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2006/08/24/cssplay/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Seven free layout templates for CakePHP</title>
		<link>http://cakebaker.42dh.com/2006/07/07/seven-free-layout-templates-for-cakephp/</link>
		<comments>http://cakebaker.42dh.com/2006/07/07/seven-free-layout-templates-for-cakephp/#comments</comments>
		<pubDate>Fri, 07 Jul 2006 11:20:48 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=222</guid>
		<description><![CDATA[Shunro Dozono, a baker from Japan, has ported the designs from Contented Designs to CakePHP. They are a good starting point for creating your own layout if you do not want to create one from scratch.]]></description>
			<content:encoded><![CDATA[<p>Shunro Dozono, a baker from Japan, has <a href="http://cakephp.seesaa.net/article/20355864.html">ported</a> the designs from <a href="http://contenteddesigns.com/templates/index.html">Contented Designs</a> to CakePHP. They are a good starting point for creating your own layout if you do not want to create one from scratch. </p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2006/07/07/seven-free-layout-templates-for-cakephp/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Tutorial: Creating CSS menus</title>
		<link>http://cakebaker.42dh.com/2006/04/09/tutorial-creating-css-menus/</link>
		<comments>http://cakebaker.42dh.com/2006/04/09/tutorial-creating-css-menus/#comments</comments>
		<pubDate>Sun, 09 Apr 2006 09:47:42 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=161</guid>
		<description><![CDATA[Andy Dawson (aka AD7six) has written a tutorial about creating a CSS menu. The focus of the tutorial is not on the CSS part, but rather on creating the necessary CakePHP helpers/components.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.noswad.me.uk">Andy Dawson</a> (aka AD7six) has written a <a href="http://wiki.cakephp.org/tutorials:css_menus">tutorial</a> about creating a CSS menu. The focus of the tutorial is not on the CSS part, but rather on creating the necessary CakePHP helpers/components.</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2006/04/09/tutorial-creating-css-menus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some CSS trouble with input and textarea in Firefox</title>
		<link>http://cakebaker.42dh.com/2006/02/02/some-css-trouble-with-input-and-textarea-in-firefox/</link>
		<comments>http://cakebaker.42dh.com/2006/02/02/some-css-trouble-with-input-and-textarea-in-firefox/#comments</comments>
		<pubDate>Thu, 02 Feb 2006 10:39:28 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=91</guid>
		<description><![CDATA[Yesterday, I noticed some weird behaviour in Firefox. I have had an input field and a textarea formatted with CSS like: input, textarea { color: red; font-size: 0.8em; } If you look at this CSS, you would assume that a text you enter will look the same whether it is in the input field or [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I noticed some weird behaviour in Firefox. I have had an input field and a textarea formatted with CSS like:</p>
<pre>
input, textarea
{
    color: red;
    font-size: 0.8em;
}
</pre>
<p>If you look at this CSS, you would assume that a text you enter will look the same whether it is in the input field or the textarea. Well, with <a href="http://www.konqueror.org">Konqueror</a>, that is true. But with Firefox, it is different. It seems to me that by default different fonts are used for the two elements. So you have to specify the font family in the CSS:</p>
<pre>
input, textarea
{
    color: red;
    font-family: Verdana,Arial,Sans-serif;
    font-size: 0.8em;
}
</pre>
<p>And so it works with Firefox, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2006/02/02/some-css-trouble-with-input-and-textarea-in-firefox/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

