0
0
SASSmarkup~20 mins

Print stylesheet organization in SASS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Print Stylesheet Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why use a separate print stylesheet in Sass?
Which of the following best explains the main reason to organize a separate print stylesheet in Sass?
ATo optimize styles specifically for printed pages, improving readability and layout when printing.
BTo apply animations and transitions only when printing documents.
CTo reduce the overall file size of the main stylesheet by removing unused styles.
DTo enable JavaScript to dynamically change styles during printing.
Attempts:
2 left
💡 Hint
Think about how printed pages differ from screens in style needs.
📝 Syntax
intermediate
2:00remaining
Correct syntax for print media query in Sass
Which option shows the correct way to write a print media query in Sass to style printed pages?
SASS
@media print {
  body {
    font-size: 12pt;
  }
}
A
@media only print {
  body {
    font-size: 12pt;
  }
}
B
@media screen and print {
  body {
    font-size: 12pt;
  }
}
C
@media (print) {
  body {
    font-size: 12pt;
  }
}
D
@media print {
  body {
    font-size: 12pt;
  }
}
Attempts:
2 left
💡 Hint
Remember the standard media query syntax for print.
layout
advanced
2:30remaining
Effect of print styles on page layout
Given this Sass print stylesheet snippet, what will be the visual effect when printing?
@media print {
  nav, footer {
    display: none;
  }
  main {
    width: 100%;
  }
}
ANavigation and footer will be hidden, but main content width remains unchanged.
BNavigation and footer will be visible, but main content width will shrink.
CNavigation and footer will be hidden, and main content will expand to full page width.
DOnly footer will be hidden; navigation remains visible with reduced width.
Attempts:
2 left
💡 Hint
Consider what happens when elements are set to display none and width 100%.
accessibility
advanced
2:30remaining
Accessibility considerations in print stylesheets
Which practice improves accessibility when organizing print stylesheets in Sass?
AEnsure high contrast colors and readable font sizes for printed text.
BUse only light gray text to save printer ink.
CHide all images to reduce printing time.
DUse very small fonts to fit more content on each page.
Attempts:
2 left
💡 Hint
Think about what makes printed text easy to read for everyone.
selector
expert
3:00remaining
Which selector targets only printed links in Sass?
In a Sass print stylesheet, which selector correctly styles only links when printing?
A@media print { a:hover { color: black; } }
B@media print { a { color: black; text-decoration: underline; } }
C@media print { a:link { color: black; } }
D@media print { a:visited { color: black; } }
Attempts:
2 left
💡 Hint
Consider which pseudo-classes apply in print media.