Media Query
استعلام الوسائط (Media Query)
Definition
CSS syntax for applying styles conditionally based on screen size, orientation, or device capability.
بنية CSS لتطبيق الأنماط بشكل مشروط بناءً على حجم الشاشة أو الاتجاه أو إمكانية الجهاز.
Why It Matters
Responsive design in 404Fault is built with Tailwind's breakpoint prefixes. Understanding that `sm:grid-cols-2` means 'two columns at 640px+' is how you read and write all responsive layouts.
التصميم المتجاوب في 404Fault مبني ببادئات نقطة توقف Tailwind. فهم أن `sm:grid-cols-2` يعني 'عمودان عند 640px+' هو كيفية قراءة وكتابة جميع التخطيطات المتجاوبة.
Full Definition
Example Usage
“<div className='grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'> — mobile: 1 col, tablet: 2, desktop: 3”
“<div className='grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'> — موبايل: عمود واحد، تابلت: 2، سطح مكتب: 3”
AI Builder Tips
Avoid these mistakes when using Media Query:
Desktop-first approach — harder with Tailwind, which is mobile-first by default
Too many custom breakpoints — stick to the standard sm/md/lg/xl set
Sign in to unlock guided AI explanations from AI Teacher.
Generate a Prompt
Copy this prompt and use it directly with any AI model — no setup needed.
Help me build a project using Media Query. Explain: 1. What is Media Query and why it matters 2. The core architecture and required tools 3. Step-by-step implementation plan 4. Common mistakes to avoid: Desktop-first approach — harder with Tailwind, which is mobile-first by default, Too many custom breakpoints — stick to the standard sm/md/lg/xl set 5. Best practices and production tips