Responsive layout, CSS architecture and encapsulation
Learn Responsive layout, CSS architecture and encapsulation (Module 21 · Angular UI Development, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Building screens that fit every device Responsive UI design means one codebase looks good on a phone, a tablet and a desktop, like water taking the shape of its glass. Start mobile first (simple one-column layout) and add rules for larger screens with media queries. Component-based UI architecture means the screen is a tree of small components (header, card, button), each responsible for one thing and reusable. Two layout tools: Flexbox arranges items in one direction (a row or a column), Grid arranges in rows and columns at once.