Can this end code be optimized in scss?

$color_1:black;
$color_2:red;
$color_3:yellow;

.txt_1{
  color: $color_1;
}
.txt_2{
  color: $color_2;
}
.txt_3{
  color: $color_3;
}
Feb.11,2022

naming can be more semantic and easy to use.


can be written like this.

$color_1:black;
$color_2:red;
$color_3:yellow;
$colorlist: $color_1 $color_2 $color_3;
@for $i from 1 through 3 {
  .txt_-sharp{$i} { color: nth($colorlist, $i); }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d909-2c3b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d909-2c3b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?