4 ms·
Looks like a great utility, but the output css isn't very compact. For example, ul li:nth-child(1) { background: red } ul li:nth-child(2) { back
by tobr 10y ago
Looks like a great utility, but the output css isn't very compact. For example,
ul li:nth-child(1) {
background: red
}
ul li:nth-child(2) {
background: red
}
ul li:nth-child(3) {
background: red
}
should just be
ul li:nth-child(1),
ul li:nth-child(2),
ul li:nth-child(3) {
background: red
}
Also, it's not very clear how to download the family.scss file, it's buried deep in an oddly named subfolder in the repo.
- robinson7d 10y agoTotally right. I made a PR to the repo showing a way to fix it: https://github.com/LukyVj/family.scss/pull/1 https://github.com/LukyVj/family.scss/pull/1
- lukyvj 10y agoHey @tobr, Thanks for your feedback, and you're right! I'll work on it for a next update. For the download part, I think it's better to get the user to the folder where he can find the file in two different versions. But I take it in consideration and I'll try to improve that part.
- JelteF 10y agoWhat would be even better is this: ul li:nth-child(-n + 3) { background: red; } See the last example on this page: https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child
- twolfson 10y agoIt might not be compact but the gzipped size is the same. $ cat <<EOF | gzip | wc -c ul li:nth-child(1) { background: red } ul li:nth-child(2) { background: red } ul li:nth-child(3) { background: red } EOF 71 # bytes $ cat <<EOF | gzip | wc -c ul li:nth-child(1), ul li:nth-child(2), ul li:nth-child(3) { background: red } EOF 71 # bytes