Simple SASS For Loop

.list { @for $i from 1 through 10 { &[data-count="#{$i}"] { .list__item { width: ((100% / $i) - 1); } } } }
Creating a SASS For Loop to check data attribute and set width.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.