<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Sass on clairecodes</title>
    <link>https://www.clairecodes.com/categories/sass/</link>
    <description>Recent content in Sass on clairecodes</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-gb</language>
    <lastBuildDate>Mon, 16 Apr 2018 22:31:21 +0100</lastBuildDate>
    
	<atom:link href="https://www.clairecodes.com/categories/sass/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Drying Out CSS Selectors with Sass Maps</title>
      <link>https://www.clairecodes.com/blog/2018-04-16-drying-out-css-selectors-with-sass-maps//</link>
      <pubDate>Mon, 16 Apr 2018 22:31:21 +0100</pubDate>
      
      <guid>https://www.clairecodes.com/blog/2018-04-16-drying-out-css-selectors-with-sass-maps//</guid>
      <description>Repetitive selectors I recently wrote some Sass that looked like this:
$color-apple: green; $color-lemon: yellow; $color-strawberry: red; .apple-button { background-color: $color-apple; } .strawberry-button { background-color: $color-strawberry; } .lemon-button { background-color: $color-lemon; } // This compiles to: // .apple-button { // background-color: green; // } // // .strawberry-button { // background-color: red; // } // // .lemon-button { // background-color: yellow; // }  (No I&amp;rsquo;m not working on a website for a greengrocers, the fruit theme is just for example purposes!</description>
    </item>
    
    <item>
      <title>Making a sticky sidebar with two lines of CSS</title>
      <link>https://www.clairecodes.com/blog/2018-04-02-making-a-sticky-sidebar-with-two-lines-of-css//</link>
      <pubDate>Mon, 02 Apr 2018 16:19:53 +0100</pubDate>
      
      <guid>https://www.clairecodes.com/blog/2018-04-02-making-a-sticky-sidebar-with-two-lines-of-css//</guid>
      <description>Have you ever been on a website where an element “sticks” to the screen and follows you as you scroll down the page? This is what I call a sticky sidebar, and I’ve spent many hours battling with legacy code trying to debug one. In the past, developers used JavaScript to build this feature, by recalculating the position of the sidebar on the browser&amp;rsquo;s scroll event. This was complicated to maintain and also costly for performance.</description>
    </item>
    
    <item>
      <title>Reasons not to use IDs in CSS</title>
      <link>https://www.clairecodes.com/blog/2018-03-19-reasons-not-to-use-ids-in-css//</link>
      <pubDate>Mon, 19 Mar 2018 20:54:03 +0000</pubDate>
      
      <guid>https://www.clairecodes.com/blog/2018-03-19-reasons-not-to-use-ids-in-css//</guid>
      <description>Sometimes when I’m reviewing code, I advise a colleague not to use IDs for CSS style selectors, and inevitably get asked why. Like standing in queues, making a cup of tea or applying a full face of makeup in the dark at 6am, avoiding IDs in CSS is something I do without thinking. I&amp;rsquo;ve been doing it for so long without questioning it, that it takes me a minute before I can explain to other people why.</description>
    </item>
    
    <item>
      <title>Styling inline code tags</title>
      <link>https://www.clairecodes.com/blog/2018-03-16-styling-inline-code-tags//</link>
      <pubDate>Fri, 16 Mar 2018 08:58:21 +0000</pubDate>
      
      <guid>https://www.clairecodes.com/blog/2018-03-16-styling-inline-code-tags//</guid>
      <description>I like writing tech-related blog posts (you’re reading one right now!). My posts often contain the &amp;lt;code&amp;gt; tag as I illustrate code examples. The default browser style for this tag can be pretty dull, typically using the system monospace font and a beige background colour. I&amp;rsquo;ve added my own custom style to this tag. This is a step-by-step explanation of it, as I&amp;rsquo;d rather do that than watch some drivel on Netflix today.</description>
    </item>
    
    <item>
      <title>Multiline comments in Sass</title>
      <link>https://www.clairecodes.com/blog/2017-11-21-multiline-comments-in-sass//</link>
      <pubDate>Tue, 21 Nov 2017 21:35:19 +0000</pubDate>
      
      <guid>https://www.clairecodes.com/blog/2017-11-21-multiline-comments-in-sass//</guid>
      <description>Note: These rules are specifically for sass-lint, because that&amp;rsquo;s my linter of choice. However, equivalent rules will (probably) exist for other linters such as stylelint or csslint.
If you lint your Sass code using an automated tool like sass-lint, you might have encountered the rule: no-css-comments. Depending on the severity level in your linter config, this will trigger an error or a warning when it encounters comments like this /* I am a CSS style comment */.</description>
    </item>
    
  </channel>
</rss>