Use grid for #grid only where grid is supported.
Acceptance criteria
- 1.Use grid for #grid only where grid is supported.
CSS Tutorial · CSS Responsive Design
These 10 tasks go with the Feature Queries chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “Apply progressive enhancements only when the browser understands a required CSS declaration or selector. It covers declaration queries, selector queries, combined conditions, progressive enhancement, and the limits of syntax-based support detection.” .
1.Test for a featureexercise · easy · 10 min
Use grid for #grid only where grid is supported.
Passes when: Use grid for #grid only where grid is supported.
2.Provide a fallbackexercise · easy · 10 min · practice plan
Flex by default, upgrading to grid where it is supported.
Passes when: Flex by default, upgrading to grid where it is supported.
3.Negate a conditionexercise · easy · 10 min · practice plan
Fall back to flex only where a made-up value is unsupported.
Passes when: Fall back to flex only where a made-up value is unsupported.
4.Combine two conditionsexercise · easy · 10 min · practice plan
Use grid only where both grid and gap are supported.
Passes when: Use grid only where both grid and gap are supported.
5.Enhance a supported layoutexercise · medium · 10 min · practice plan
Grid with a 10px gap and two fixed columns, all behind a feature test.
Passes when: Grid with a 10px gap and two fixed columns, all behind a feature test.
6.Fix the misspelled rulebug fix · easy · 8 min
The rule is @supports, with an s.
Passes when: The rule is @supports, with an s.
7.Fix the missing parenthesesbug fix · easy · 8 min · practice plan
The tested declaration must be wrapped in parentheses.
Passes when: The tested declaration must be wrapped in parentheses.
8.Fix the inverted testbug fix · easy · 8 min · practice plan
Without `not`, this asks whether a nonsense value IS supported.
Passes when: Without `not`, this asks whether a nonsense value IS supported.
9.Fix the missing operatorbug fix · easy · 8 min · practice plan
Two conditions are joined with `and`.
Passes when: Two conditions are joined with `and`.
10.Fix the property-only testbug fix · easy · 8 min · practice plan
@supports tests a property AND a value, separated by a colon.
Passes when: @supports tests a property AND a value, separated by a colon.
Between them these tasks cover @supports, Negated and combined conditions and Fallbacks.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.