@darrion.kuhn
To extend the screen size in Tailwind CSS, you can either modify the default configuration or define custom screen sizes in your project. Here's how you can do it:
1 2 3 4 5 6 7 8 9 |
module.exports = { theme: { extend: { screens: { '2xl': '1536px', } } } } |
1 2 3 4 5 6 7 8 9 10 |
module.exports = { theme: { extend: { screens: { 'mobile': '320px', 'tablet': '768px' } } } } |
After adding or modifying the screen sizes in your tailwind.config.js
file, you can use these custom screen sizes in your utility classes like sm:
, md:
, xl:
, etc. For example, you can apply styles specific to the mobile
screen size by using the mobile:
prefix in your class names:
1
|
<div class="mobile:flex md:flex lg:hidden">Responsive content</div> |
By following these steps, you can extend the screen size in Tailwind CSS to better suit your project's design requirements.