Gradient mixin dans le Bootstrap?

Il y a un mixin dans le Bootstrap thème.moins fichier, que j'essaie de comprendre. Je suis très nouveau pour les MOINS juste essayer d'apprendre autant que possible, tout en continuant à faire le travail LOL.

La base mixin est comme suit:

#gradient {

  //Vertical gradient, from top to bottom
  //
  //Creates two color stops, start and end, by specifying a color and position for each color stop.
  //Color stops are not available in IE9 and below.
  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
  background-image: -webkit-gradient(linear, left @start-percent, left @end-percent, from(@start-color), to(@end-color)); //Safari 4+, Chrome 2+
  background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); //Safari 5.1+, Chrome 10+
  background-image:  -moz-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); //FF 3.6+
  background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); //Standard, IE10
  background-repeat: repeat-x;
  filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); //IE9 and down

}

Le mixin pour les styles de boutons, c'est comme si:

.btn-styles(@btn-color: #555) {
     #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));
     ...

J'essaie de comprendre comment utiliser ce... ai-je besoin d'un parent de l'élément avec un id de #gradient et un élément enfant de .vertical ? Le reste je peux comprendre, comme le réglage des couleurs, etc.

Sur une note de côté, je pensais que le #gradient > .vertical est un opérateur de comparaison, mais c'est incorrect droit? C'est juste un CSS sélecteur d'enfant droit?

Je vais peut-être la mauvaise direction, mais j'apprécie l'aide. Merci beaucoup!

OriginalL'auteur jaminroe | 2013-12-04