Created
October 19, 2023 09:02
-
-
Save kievsash/4c0be8256a44d42bc3b21a39877f1c9c to your computer and use it in GitHub Desktop.
[scss] generate padding classes to be able to assign it for each td (row, column): tr-1-td-3-p0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.sassmeister.com/ - playground | |
@for $tr from 1 through 30 { | |
@for $td from 1 to 30 { | |
.tr-#{$tr}-td-#{$td}-p0 tr:nth-child(#{$tr}) td:nth-child(#{$td}) { | |
padding: 0; | |
} | |
} | |
} | |
/* | |
generate classes | |
.tr-1-td-1-p-0 tr:nth-child(1) td:nth-child(1) { | |
padding: 0; | |
} | |
.tr-1-td-2-p-0 tr:nth-child(1) td:nth-child(2) { | |
padding: 0; | |
} | |
etc | |
for table | |
**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment