--- id: 5a9d7286424fe3d0e10cad13 title: Attach a Fallback value to a CSS Variable challengeType: 0 videoUrl: '' localeTitle: إرفاق قيمة الرجوع إلى متغير CSS --- ## Description
عند استخدام المتغير كقيمة لعنوان CSS ، يمكنك إرفاق قيمة احتياطي سيعود متصفحك إليها إذا كان المتغير المحدد غير صالح. ملاحظة: لا يتم استخدام هذا الاحتياطي لزيادة توافق المتصفح ، ولن يعمل على متصفحات IE. بدلاً من ذلك ، يتم استخدامه بحيث يكون للمستعرض لون لعرضه إذا لم يتمكن من العثور على المتغير الخاص بك. إليك طريقة القيام بذلك:
الخلفية: var (- penguin-skin، black)؛
سيؤدي هذا إلى تعيين خلفية سوداء إذا لم يتم تعيين المتغير الخاص بك. لاحظ أن هذا يمكن أن يكون مفيدا لتصحيح الأخطاء.
## Instructions undefined ## Tests
```yml tests: - text: تطبيق القيمة الاحتياطية من black إلى خاصية background للفئة penguin-top . testString: 'assert(code.match(/.penguin-top\s*?{[\s\S]*background\s*?:\s*?var\(\s*?--pengiun-skin\s*?,\s*?black\s*?\)\s*?;[\s\S]*}[\s\S]*.penguin-bottom\s{/gi), "Apply the fallback value of black to the background property of the penguin-top class.");' - text: '' testString: 'assert(code.match(/.penguin-bottom\s*?{[\s\S]*background\s*?:\s*?var\(\s*?--pengiun-skin\s*?,\s*?black\s*?\)\s*?;[\s\S]*}/gi), "Apply the fallback value of black to the background property of the penguin-bottom class.");' ```
## Challenge Seed
```html
```
## Solution
```js // solution required ```