Print Stylesheet Organization with Sass
📖 Scenario: You are creating a website that looks great on screen and also prints nicely on paper. To do this, you will organize your Sass code to separate screen styles from print styles. This helps keep your styles clean and easy to manage.
🎯 Goal: Build a Sass file that defines screen styles and print styles separately using @media queries. You will create variables for colors, write styles for the body and headings for screen, then add print-specific styles that hide navigation and change text color for printing.
📋 What You'll Learn
Create a Sass variable
$primary-color with the value #3498db.Write styles for
body and h1 for screen display using @media screen.Write print-specific styles inside
@media print that hide nav and set body text color to black.Organize the Sass code clearly separating screen and print styles.
💡 Why This Matters
🌍 Real World
Websites often need to look good on screen and print well on paper. Organizing styles with media queries helps maintain clean code and better user experience.
💼 Career
Front-end developers must write maintainable CSS/Sass that supports multiple devices and media, including print. This skill is essential for professional web development.
Progress0 / 4 steps