Penyambungan Pseudokelas dalam LESS

Ampersand mudah digunakan semasa bekerja dengan pseudokelas. Lihat contoh:

styles.lessa {
  color: blue;
  &:hover {
    color: red;
  }
}

Hasil kompilasi:

styles.cssa {
  color: blue;
}
a:hover { 
  color: red;
}
Задание 1

Terangkan, apakah hasil kompilasi kod berikut:

styles.lessa.class {
  &:link {
    color: red;
  }
  &:visited {
    color: blue;
  }
  &:hover {
    color: green;
  }
}
Задание 2

Permudahkan kod yang diberikan:

styles.css#block {
  width: 300px;
}
#block a:link, #block a:visited {
  color: red;
}
#block a:hover {
  color: blue;
}