मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)75k · #2848

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 पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/flexbox-patterns/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

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.

repo: thedaviddias/Front-End-Checklist

लोकप्रियता

GitHub स्टार
75k
रैंकिंग में स्थान
#2848
लाइसेंस
MIT
अपडेट की गई
31/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills