Complete the code to define a custom breakpoint named 'tablet' with a minimum width of 640px.
module.exports = {
theme: {
screens: {
tablet: '[1]',
},
},
}The custom breakpoint 'tablet' is set to a minimum width of 640px, so the value must be "640px".
Complete the code to apply a background color only on screens wider than the custom 'tablet' breakpoint.
<div class="[1]:bg-blue-500 bg-red-500 p-4"> Responsive box </div>
The 'tablet' prefix applies styles starting from the custom 'tablet' breakpoint (640px and up). So the background will be blue on tablet and larger screens, red otherwise.
Fix the error in the custom breakpoint definition to use the correct syntax for a min-width media query.
module.exports = {
theme: {
screens: {
tablet: '[1]',
},
},
}Custom breakpoints can be defined using raw media queries. The correct syntax for min-width is "(min-width: 640px)" with parentheses.
Fill both blanks to define two custom breakpoints: 'tablet' at 640px and 'laptop' at 1024px.
module.exports = {
theme: {
screens: {
tablet: '[1]',
laptop: '[2]',
},
},
}The 'tablet' breakpoint is 640px and 'laptop' breakpoint is 1024px, so those values must be used.
Fill all three blanks to create a responsive text size: small on mobile, medium on tablet, and large on laptop.
<p class="text-[1] [2]:text-[3] laptop:text-lg"> Responsive text </p>
The base text size is 'sm' for small screens. The 'tablet' prefix applies 'base' text size on tablet screens. The 'laptop' prefix applies 'lg' text size on laptop screens.