0
0
SASSmarkup~20 mins

Why custom grids offer control in SASS - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Grid Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why use custom grids in CSS layouts?

Which of the following best explains why custom grids give developers more control in layout design?

AThey remove the need for media queries in responsive design.
BThey automatically adjust content without any developer input.
CThey allow precise placement of elements in rows and columns beyond fixed frameworks.
DThey restrict layouts to only two columns for simplicity.
Attempts:
2 left
💡 Hint

Think about how grids let you decide exactly where each box goes.

📝 Syntax
intermediate
2:00remaining
Sass grid mixin for custom columns

What is the output CSS of this Sass mixin usage?

@mixin grid-columns($count) {
  display: grid;
  grid-template-columns: repeat($count, 1fr);
}

.container {
  @include grid-columns(3);
}
A.container { display: grid; grid-template-columns: repeat(3, 1fr); }
B.container { display: flex; grid-template-columns: repeat(3, 1fr); }
C.container { display: grid; grid-template-columns: 3fr; }
D.container { display: grid; grid-template-columns: repeat(1fr, 3); }
Attempts:
2 left
💡 Hint

Check how the repeat function is used in CSS grid.

selector
advanced
2:00remaining
Targeting grid items with Sass nesting

Given this Sass code, what CSS selector is generated for the nested .item?

.grid {
  display: grid;
  & > .item {
    padding: 1rem;
  }
}
A.grid > .item { padding: 1rem; }
B.grid .item { padding: 1rem; }
C.item > .grid { padding: 1rem; }
D.grid.item { padding: 1rem; }
Attempts:
2 left
💡 Hint

The & symbol represents the parent selector in Sass.

layout
advanced
2:00remaining
Effect of custom grid gaps in layout

What visual effect does setting grid-gap: 2rem; have on a CSS grid container?

AIt adds 2rem padding inside each grid item.
BIt removes spacing between grid items.
CIt sets the grid container's margin to 2rem.
DIt adds 2rem space between all rows and columns inside the grid.
Attempts:
2 left
💡 Hint

Think about spacing between boxes in a grid.

accessibility
expert
3:00remaining
Accessibility considerations for custom grid layouts

Which practice improves accessibility when using custom CSS grids for page layout?

ARely only on visual grid placement without adjusting tab order.
BUse semantic HTML elements and ensure keyboard navigation order matches visual grid order.
CUse only <div> elements with no ARIA roles for grid items.
DDisable keyboard navigation to prevent confusion.
Attempts:
2 left
💡 Hint

Think about how screen readers and keyboard users experience the page.