css-custom-properties
यह क्या करती है
यह स्किल स्टाइलशीट में उन हार्ड-कोडेड मानों को जाँचती है जो साझा डिज़ाइन टोकन होने चाहिए। यह थीमिंग और वैश्विक स्टाइल बदलाव सरल चाहने वाले डेवलपर के लिए है।
कब इस्तेमाल करें
- ✓जब एक ही रंग या स्पेसिंग मान कई जगह दिखता है।
- ✓जब आप डार्क मोड या नई ब्रांड थीम जोड़ना चाहते हैं।
- ✓जब एक डिज़ाइन मान बदलने के लिए कई लाइनें बदलनी पड़ती हैं।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/css-custom-properties/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी स्टाइलशीट में दोहराए गए ब्रांड रंग और स्पेसिंग मान साझा कस्टम प्रॉपर्टी में ले जाएँ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट दोहराए गए मानों को root एलिमेंट पर कस्टम प्रॉपर्टी के रूप में परिभाषित करता है, और हर हार्ड-कोडेड उपयोग को var संदर्भ से बदलता है, जहाँ उपयोगी हो वहाँ फ़ॉलबैक के साथ।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Use CSS custom properties for design tokens
Hard-coded color values and magic numbers scattered across CSS files make global changes (a rebrand, a dark mode, a spacing adjustment) require finding and updating dozens of individual lines. Custom properties centralize these values so one change propagates everywhere — and enable runtime theming that preprocessor variables cannot.
Quick Reference
- Define reusable values as --variable-name on :root
- Custom properties cascade and inherit — they can be overridden at any scope
- Use var(--name, fallback) to provide fallback values
- Custom properties are runtime values — JavaScript can read and write them
Check
Find hard-coded color values, spacing values, and font sizes in this CSS file that should be replaced with CSS custom properties.
Fix
Extract repeated and meaningful values into CSS custom properties on :root and replace all usages with var() references.
Explain
Explain CSS custom properties: how they differ from preprocessor variables, how cascade and inheritance work, and how to use them for theming.
Code Review
Review stylesheets, component styles, and responsive states related to Use CSS custom properties for design tokens. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/css/css-custom-properties
अक्सर पूछे जाने वाले सवाल
कस्टम प्रॉपर्टी preprocessor वेरिएबल से कैसे अलग हैं?
स्किल कहती है कि वे रनटाइम मान हैं, जिन्हें किसी भी दायरे में ओवरराइड किया जा सकता है और JavaScript से पढ़ा या बदला जा सकता है।
क्या ये डार्क मोड में मदद करती हैं?
हाँ। स्किल कहती है कि ये रनटाइम थीमिंग संभव बनाती हैं, जो preprocessor वेरिएबल नहीं कर सकते।
फ़ॉलबैक क्या करता है?
अगर कस्टम प्रॉपर्टी सेट नहीं है, तो यह बैकअप मान देता है।
जानकारी
लेखक का मूल विवरण
Use when reviewing stylesheets, component styles, and responsive behavior related to Use CSS custom properties for design tokens. Check the rendered layout across breakpoints and interaction states before proposing a fix.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2797
- लाइसेंस
- MIT
- अपडेट की गई
- 31/10/2026
कमेंट
- …
इस repository की और skills
frontendchecklist
75kकमांड-लाइन टूल से फ़्रंटएंड कोड और लाइव पेजों को एक्सेसिबिलिटी, स्पीड, SEO और सिक्योरिटी के 380 से ज़्यादा नियमों से जाँचती है।
frontend-checklist-global
75kफ़्रंटएंड प्रोजेक्ट को Front-End Checklist के सभी 386 नियमों से ऑडिट करती है, और हर मिली समस्या का ठोस समाधान देती है।
404-page
75kजाँचती है कि आपका गुम पेज उपयोगी लिंक देता है और सही 404 स्टेटस लौटाता है, ताकि भटके हुए विज़िटर रास्ता ढूँढ सकें।
about-page
75kजाँचती है कि आपकी साइट पर एक साफ़ About पेज है जो बताता है कि उसे कौन चलाता है, ताकि विज़िटर और सर्च इंजन का भरोसा बढ़े।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।