<p><span>Explore the full spectrum of CSS Grid concepts and efficiently leverage its specifications with a project that incorporates both basic and advanced aspects</span></p><p><span>Purchase of the print or Kindle book includes a free PDF eBook</span></p><h4><span>Key Features</span></h4><ul><li><
Mastering CSS Grid: A comprehensive and practical guide to creating beautiful layouts with CSS Grid
โ Scribed by Pascal Thormeier
- Publisher
- Packt Publishing
- Year
- 2023
- Tongue
- English
- Leaves
- 330
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
Explore the full spectrum of CSS Grid concepts and efficiently leverage its specifications with a project that incorporates both basic and advanced aspects
Purchase of the print or Kindle book includes a free PDF eBook
Key Features
- Explore the differences between grid boxes and block containers to enhance your web design knowledge
- Create block-level grids, inline grids, and nested grids to create responsive layouts
- Adopt best practices for attaching elements to your layout by using explicitly defined grid lines or grid areas
Book Description
CSS Grid has revolutionized web design by filling a long-existing gap in creating real, dynamic grids on the web. This book will help you grasp these CSS Grid concepts in a step-by-step way, empowering you with the knowledge and skills needed to design beautiful and responsive grid-based layouts for your web projects.
This book provides a comprehensive coverage of CSS Grid by taking you through both fundamental and advanced concepts with practical exercises. You'll learn how to create responsive layouts and discover best practices for incorporating grids into any design. As you advance, you'll explore the dynamic interplay between CSS Grid and flexbox, culminating in the development of a usable responsive web project as a reference for further improvement. You'll also see how frameworks utilize CSS Grid to construct reusable components and learn to rebuild and polyfill CSS Grid for browsers that don't fully support it yet. The concluding chapters include a quick reference and cheat sheet, making this book an indispensable resource for frontend developers of all skill levels.
By the end of this book, you'll have thoroughly explored all aspects of CSS Grid and gained expert-level proficiency, enabling you to craft beautiful and functional layouts for web projects of any size.
What you will learn
- Enhance your CSS Grid skills by mastering both its fundamental and advanced concepts
- Combine flexbox and CSS Grid seamlessly to produce stunning and responsive page layouts
- Discover the potential of complex grid layouts to improve your next project
- Examine how frameworks utilize CSS Grid to create reusable components
- Leverage the benefits of grid-based layouts to create visually appealing websites
- Create custom polyfills and learn when to use grid layouts
- Build dynamic and user-friendly web projects using CSS Grid's responsive design capabilities
Who this book is for
This book is for web developers and designers who want to learn CSS Grid and improve their layout design skills. This book will also be a valuable resource for CSS developers seeking to advance their skills to the most proficient level. Additionally, this book will serve as an excellent guide for those who wish to expand their toolset to include flexbox and grids.
Table of Contents
- Understanding the Basic Rules and Structures for CSS Grid
- Project Introduction: What We'll Work on and First Tasks
- Building Advanced Grid Layouts
- Understanding and Creating Responsive and Fluid Grid Layouts
- Implementing Layouts with Flexbox and CSS Grid
- Benefits of Grid Layouts and When Not to Use Them
- Polyfilling CSS Grid's Missing Features
- Grids in the Wild โ How Frameworks Implement Grids
- Quick Reference and Cheat Sheet
โฆ Table of Contents
Cover
Title Page
Copyright
Dedication
Contributors
Table of Contents
Preface
Part 1โWorking with CSS Grid
Chapter 1: Understanding the Basic Rules and Structures for CSS Grid
Technical requirements
Understanding the basic rules related to CSS Grid
Defining grid terminology
Creating our first grid
Arranging grid elements
Adding some breathing room (or gaps)
Using grid templates
Naming grid rows and columns
Grid flow
Understanding special grid-related units, keywords, and functions
The fractional unit
Sizing keywords and functions
Repetitive column and row definitions
Using shortcuts
The grid attribute
The grid-template attribute
The grid-row and grid-column attributes
The gap attribute
Summary
Chapter 2: Project Introduction: What Weโll Work on and First Tasks
Technical requirements
Introducing Awesome Analytics โ our gibberish analytics tool
Setting up Awesome Analytics locally
Receiving our first task โ implementing the grids
Exploring the code of Awesome Analytics
The CSS structure
The HTML structure
The JavaScript structure
Fixing Awesome Analyticsโ layout problem โ a possible solution
Analyzing the problem
Creating the page layout
Arranging the chart boxes
Summary
Chapter 3: Building Advanced Grid Layouts
Technical requirements
Understanding the row axis and column axis and how to influence them
Arranging grid items and grid cells with alignment and justification rules
Aligning and justifying items
Aligning and justifying the entire grid within its container
Defining and using advanced grid templates
Defining empty cells in grid area templates
Naming grid areas implicitly
Practicing creating flexible layouts with JavaScript
Arranging nested child elements in parent grids
Creating subgrids
Understanding how subgrids work
Understanding what is inherited
Understanding subgridsโ current state of development (as of 2023)
Masonry layouts
Understanding what masonry layouts are
Using masonry layouts with CSS Grid and knowing about its pitfalls
Practicing with Awesome Analytics
Receiving the task
Implementing a possible solution
Summary
Part 2 โ Understanding the CSS Grid Periphery
Chapter 4: Understanding and Creating Responsive and Fluid Grid Layouts
Technical requirements
Understanding the challenges of designing layouts
Existing things
The content
The target groups
The stakeholders
The web design principles
Understanding the difference between adaptive, responsive, and fluid layouts
Adaptive layouts
Responsive layouts
Fluid layouts
Learning responsive layout best practices
Prioritizing content
Applying mobile first
Designing with worst-case content in mind
Combining adaptiveness, responsiveness, and fluidity
Implementing responsive and fluid layouts with CSS Grid
Media queries and altering grid area templates
Using sizing keywords and functions for fluid layouts
Practicing responsive layouts with Awesome Analytics
The task at hand
A possible solution
Summary
Chapter 5: Implementing Layouts with Flexbox and CSS Grid
Technical requirements
Arranging media objects
Arranging teasers and card elements
Arranging forms and form elements
Input groups
Compound form elements
Form layouts
Building page layouts and partials
Headers and navigation
Footers
Building entire pages
Practicing with Awesome Analytics
Analyzing the code base
Adjusting the header
Adjusting the chart boxes
Adjusting the page layout
Adjusting the chart box container
Conclusion
Summary
Chapter 6: Benefits of Grid Layouts and When Not to Use Them
Technical requirements
Cherishing the benefits of grid layouts
The ease of design and development
Visual appeal
Simple to adapt and expand
Understanding the drawbacks of grid layouts
Compatibility with content
Losing identity
The temptation of packing things too tight
Being restricted
Learning about some alternatives for grid layouts
Breaking out of the grid
Using animations
Using different shapes
A list to help us decide
Summary
Part 3 โ Exploring the Wider Ecosystem
Chapter 7: Polyfilling CSS Gridโs Missing Features
Technical requirements
Understanding the tools to write a CSS polyfill from scratch
Understanding PostCSS
Understanding how to write PostCSS plugins
Understanding Browserify
Tying loose ends
Creating a polyfill for subgrid
Understanding how subgrid is meant to work
Why and when the polyfill may be useful
Writing a polyfill
Why we shouldnโt use this polyfill
Creating a polyfill for masonry
Understanding how masonry is meant to work
Why and when the polyfill may be useful
Writing the polyfill
Why we shouldnโt use this polyfill
Creating a polyfill for additional pseudo-classes
Understanding the idea behind nth-row and nth-col
Why and when the polyfill may be useful
Writing the polyfill
Why we shouldnโt use this polyfill
Animating grids
Understanding the goal of grid animations
Using the animate-css-grid library
Understanding why we should not use polyfills
Summary
Chapter 8: Grids in the Wild โ How Frameworks Implement Grids
Technical requirements
Learning how Tailwind implements grids
Learning how Bootstrap implements grids
Learning how Foundation implements grids
Float grid
Flex grid
XY grid
Learning how Bulma.io implements grids
Learning how UIkit implements grids
Learning how Pure.css implements grids
Learning how Tachyons implements grids
Learning how Cutestrap implements grids
Learning how other frameworks donโt implement grids
Practising Bootstrap and Tailwind frameworks with AwesomeAnalytics
Implementing Tailwindโs grid
Implementing Bootstrapโs grid
Summary
Part 4 โ A Quick Reference
Chapter 9: Quick Reference and Cheat Sheet
Technical requirements
Important terms and their definitions
CSS Grid attributes, values, functions, and units
Display property values
CSS Grid recipes for everyday use cases
Holy grail layouts
Responsive Holy grail layouts using grid areas
Dashboard box arrangement
A fluid image gallery with a fixed aspect ratio and minimum element width
Media objects
Full-height pages with a sticky header
Screen-filling sections for landing pages
Gantt charts
Grid design best practices and doโs and donโts
A framework cheat sheet for the Holy grail layout
Tailwind
Bootstrap
Foundation (XY Grid only)
Bulma.io
UIKit
Pure.css
Tachyons
Cutestrap
Summary
Index
About Packt
Other Books You May Enjoy
๐ SIMILAR VOLUMES
<p>Layout in CSS has always been a tricky task: hacking solutions using positioning, floats, and the one-dimensional flexbox has never been very satisfactory. Fortunately, there is a new tool to add to our arsenal: CSS Grid Layout. It is an incredibly powerful layout system that allows us to design
Layout in CSS has always been a tricky task: hacking solutions using positioning, floats, and the one-dimensional flexbox has never been very satisfactory. Fortunately, there is a new tool to add to our arsenal: CSS Grid Layout. It is an incredibly powerful layout system that allows us to design pag
<p>CSS has grown from a language for formatting documents into a robust language for designing web applications. Its syntax is easy to learn, making CSS a great entry point for those new to programming. Indeed, it's often the second language that developers learn, right behind HTML.</p> <p>One of C