Skip to content

PawelMTRK/leftpad-scss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

SCSS Left Pad

Silly implementation of a well-known JS function in SCSS.

Usage

@debug leftpad("bar", 5, "_");
// "__bar"

@debug leftpad("foo", 4, "");
// " foo"

Used to generate Markdown-like headings:

@import "leftpad.scss";
// ...

@for $i from 1 through 5 {
    pre:nth-child(#{$i})::before {
        content: leftpad(" ", $i+1, "#");
    }
}

Why?

Cause why not?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages