LESS'te Sözde Sınıfları Birleştirme

Ampersand, sözde sınıflarla çalışırken kullanımı uygundur. Örneğe bakın:

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

Derleme sonucu:

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

Aşağıdaki kodun derleme sonucu ne olur, anlatın:

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

Verilen kodu basitleştirin:

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