flexbox-patterns
यह क्या करती है
यह स्किल CSS flexbox कोड में ऐसी आम गलतियाँ देखती है जो लेआउट बिगाड़ती हैं। यह flex से पेज लेआउट बनाने वाले डेवलपर्स के लिए है।
कब इस्तेमाल करें
- ✓जब flex row के भीतर टेक्स्ट बाहर निकले या कट जाए।
- ✓जब flex आइटम्स के बीच स्पेसिंग असमान या नियंत्रित करना मुश्किल हो।
- ✓जब आइटम्स अपेक्षा से अलग तरीके से सिकुड़ें या फैलें।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/flexbox-patterns/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरे flexbox CSS में ऐसी गलतियाँ जाँच सकते हैं जो लेआउट बिगाड़ती हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट ऐसी flex सेटिंग्स खोजता है जो सिकुड़ने या overflow की समस्या पैदा करती हैं, और ऐसे margins जिनकी जगह gap बेहतर काम करता। ज़रूरत हो तो वह सही मान और min-width का समाधान सुझाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Apply Flexbox best practices
Flexbox is one of the most used CSS features, but its unintuitive default values (flex-shrink:1, min-width:auto) cause layout bugs that are hard to diagnose. Understanding the flex shorthand and the min-width:0 fix prevents the most common Flexbox breakage scenarios.
Quick Reference
- Flexbox is for one-dimensional layouts (a row OR a column)
- Use flex: 1 1 0 (shorthand: flex:1) for equal-width items that fill space
- Add min-width: 0 to flex children when text overflow truncation doesn't work
- Use gap instead of margin for spacing between flex items
Check
Review this CSS for common Flexbox mistakes: missing min-width:0 on text-containing flex children, using margin instead of gap for spacing, and improper flex shorthand usage.
Fix
Fix the Flexbox layout issues: add min-width:0 where needed, replace inter-item margins with gap, and correct flex shorthand values.
Explain
Explain how flex-grow, flex-shrink, and flex-basis work, what the flex shorthand means, and why min-width:0 fixes text overflow in flex layouts.
Code Review
Review stylesheets, component styles, and responsive states related to Apply Flexbox best practices. 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/flexbox-patterns
अक्सर पूछे जाने वाले सवाल
flex लेआउट में टेक्स्ट overflow क्यों होता है?
flex children की एक डिफ़ॉल्ट न्यूनतम चौड़ाई होती है जो टेक्स्ट को सिकुड़ने से रोक सकती है, और स्किल इसे ठीक करने के लिए min-width को 0 सेट करने का सुझाव देती है।
gap या margin इस्तेमाल करूँ?
स्किल flex आइटम्स के बीच स्पेसिंग के लिए gap की सिफ़ारिश करती है।
flex 1 का क्या मतलब है?
स्किल इसे उन आइटम्स के लिए शॉर्टहैंड बताती है जो उपलब्ध जगह को बराबर बाँटते हैं।
जानकारी
लेखक का मूल विवरण
Use when reviewing stylesheets, component styles, and responsive behavior related to Apply Flexbox best practices. Check the rendered layout across breakpoints and interaction states before proposing a fix.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2848
- लाइसेंस
- 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 फॉलो करवाता है।