Inheriting Selectors in SASS

When working with styles, problems with inheritance can arise. However, with the @extend directive, they are easily avoided, since it clearly specifies which selector should inherit the styles of another. Let's look at an example:

Let's look at an example:

style.scss.warning {
  border: 1px solid;
  background-color: #ffd900;
}

.personalWarning {
  @extend .warning;
  border-width: 3px;
}

Now let's look at the compilation result:

style.css.warning, .personalWarning {
  border: 1px solid;
  background-color: #ffd900; }

.personalWarning {
  border-width: 3px; 
}
Задание 1

Tell me what the result of compiling the following code will be:

styles.scss#product-card {
  color: #302f2f;
  font-family: 'Times New Roman', Times, serif;
}

#product-card-title {
  @extend #product-card;
  font-weight: 600px;
}
Задание 2

Change the conditions of the previous problem so that #product-card inherits from #product a width of 500px.