Categories
CSS

Importing Sass Files

I was restructuring some css, as you do on a Saturday, and learned something new thanks to Michael Arestad.

Instead of listing out your imports like this:

@import file.scss;
@import somefile.scss;
@import yofile.scss;
@import lastfile.scss;

You can do this:

@import
"file",
"somefile",
"yofile",
"lastfile";

That means no file names and only writing out import once! Its pretty minor, but oh so readable and clean.

Categories
CSS Web Design

Change Text Highlight Color

This has been around a while, but I have just started implementing it on sites. This detail adds a nice touch, further extending the color scheme and also makes text on dark backgrounds easier to read when highlighting. Highlight the text on this page, you will see it is black on green. The browser default would be gray on a light blue background, which is not easy to read. Below is the code I used:

::selection { background:#c3effd; color:#000;}
::-moz-selection { background:#c3effd; color:#000; /* Firefox */ }