extend is an keyword in LESS and pseudo class used to inherent the properties of one css selector to another selector. This will be used to apply same set of selector attributes in multiple places and enables DRY and inheritence principal

SASS also has feature extend placeholder (placeholder)[/css/sass-placeholder/] with same features.

LESS CSS provides extend ruleset to reuse selector attribute across multiple places

Let’s declare button styles and these are basic styles for a button

.button {
    font: weight 400px;
    border-radius: 4px;
  }
  
  .button:hover {
    color : grey;
  }
  

Let’s extend .button selector and declare primary and second versions of button as follows

 .button-primary{
    color:green;
    &:extend(.button);
  }
  .button-secondary{
    color:blue;
    &:extend(.button);
  }

And generated output is

.button,
.button-primary,
.button-secondary {
font: weight 400px;
border-radius: 4px;
}
.button:hover {
color: grey;
}
.button-primary {
color: green;
}
.button-secondary {
color: blue;
}

.button selectors properties are merged to extended class where extend keyword is used.