Skip to content
F

Family.scss

A set of 20 smart SASS mixins

Open source

#333in Design
0In stores

Description

Family.scss is a Sass library of 26 mixins for styling elements by their position among their siblings. Instead of writing :nth-child select…

Highlights

  • 26 Sass mixins for styling :nth-child items
  • Named mixins such as first(3) and between(3, 6)
  • Covers even, odd and counted-from-end positions
  • About 4 KB download
  • Public source code and releases on GitHub

Ratings & Reviews

No ratings yet

Be the first to rate Family.scss.

People also visit

S

Sass

Syntatically Awesome Style Sheets

Design
Launch
P

primer-support

Sass variables, mixins, and functions for use in our components

UI Libraries
Launch
S

scss-best-practices

SCSS/Sassy CSS best practices and coding guidelines for maintainable

AI Skills
Get
U

unocss

Instant atomic CSS engine

AI Skills
Get
B

bennettfeely.com/clippy

Clip path generator

Design
Launch
M

missing.css

The Missing CSS Stylesheet

Design
Launch

Family.scss FAQ

What is Family.scss?

A Sass library of 26 mixins that style elements by their position among siblings. You call a mixin such as first(3) and it writes the matching :nth-child rule for you.

How do I use a mixin?

Include it inside a selector, for example ul li { @include first(3) { background: red; } }. The arguments set the range, such as between(3, 6) for items three to six.

How do I get it?

Download the roughly 4 KB file from the project site, or get the source and releases from its GitHub repository.

Which positions can I target?

The documentation lists first, last, after-first, from-end, between, even-between, odd-between, n-between, all-but, each, from-first-last, middle and all-but-first-last, plus first-of and last-of.

Is Family.scss open source?

The source code is public on GitHub. The page does not state a license, so check the repository before reusing the code.

What are the best Family.scss alternatives?

Popular alternatives to Family.scss include Sass, bennettfeely.com/clippy and missing.css. See all Family.scss alternatives

Developer Stuff

Badges