--- id: 587d7fa5367417b2b2512bbd title: Extend One Set of CSS Styles to Another Element challengeType: 0 videoUrl: '' localeTitle: '' --- ## Description
لدى Sass ميزة تسمى extend تجعل من السهل استعارة قواعد CSS من عنصر واحد والبناء عليها في عنصر آخر. على سبيل المثال ، تقوم الكتلة أدناه من قواعد CSS بنمط طبقة .panel . له background-color height border .
.فريق{
لون الخلفية: أحمر.
الارتفاع: 70 بكسل ؛
border: 2px solid green؛
}
أنت الآن تريد لوحة أخرى تسمى .big-panel . يحتوي على نفس الخصائص الأساسية مثل .panel ، ولكنه يحتاج أيضًا إلى width وحجم font-size . من الممكن نسخ قواعد CSS الأولية ولصقها من .panel ، ولكن يصبح الرمز متكررًا عند إضافة المزيد من أنواع اللوحات. على extend التوجيه هو وسيلة بسيطة لإعادة استخدام قواعد مكتوبة لعنصر واحد، ثم أضيف أكثر لآخر:
. كبير لوحة {
extend .panel؛
العرض: 150 بكسل ؛
حجم الخط: 2em ؛
}
سيكون .big-panel نفس الخصائص مثل .panel بالإضافة إلى الأنماط الجديدة.
## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'assert(code.match(/\.info-important\s*?{[\s\S]*background-color\s*?:\s*?magenta\s*?;[\s\S]*}/gi), "Your info-important class should have a background-color set to magenta.");' - text: يجب أن تستخدم فئة info-important الخاصة بك @extend ليرث التصميم من فئة info . testString: 'assert(code.match(/\.info-important\s*?{[\s\S]*@extend\s*?.info\s*?;[\s\S]*/gi), "Your info-important class should use @extend to inherit the styling from the info class.");' ```
## Challenge Seed
```html

Posts

This is an important post. It should extend the class ".info" and have its own CSS styles.

This is a simple post. It has basic styling and can be extended for other uses.

```
## Solution
```js // solution required ```