Nth Function In Lists 
Nth Function In Lists
by L+
Video Lecture 9 of 30
Not yet rated
Views: 985
Date Added: April 2, 2015

Lecture Description

This is the 2nd tutorial in a series that show users how to code CSS using advanced features in Sass.

This tutorial covers the use of the Nth function to find values in lists. This example goes over the basics of Nth and then uses an @each statement to build gradually lighten a back background over 4 separate divs.

The code:
@each $p in (
one black,
two black + 20,
three black + 40,
four black + 60
) {
.#{nth($p,1)} { background:#{nth($p,2)}; }
}

Course Index

Course Description

A series of Sass tutorials showing the installing of, the basics, and using key features. The advanced series shows you more in depth features that Sass offers. The Compass series will cover how using Compass in your projects can save you time and extend Sass and CSS even further.

Some source files are located here: https://github.com/stolinski/Level-Up-Tuts---Sass-Tutorials

Comments

There are no comments. Be the first to post one.
  Post comment as a guest user.
Click to login or register:
Your name:
Your email:
(will not appear)
Your comment:
(max. 1000 characters)
Are you human? (Sorry)