Penyambungan Pseudokelas dalam SASS

Ampersand mudah digunakan semasa bekerja dengan pseudokelas. Lihat contoh:

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

Hasil pengkompilasian:

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

Beritahu, apakah hasil pengkompilasian kod berikut:

styles.scssa.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;
}