Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] max-w-screen-* utilities are not provided by default #13267

Closed
zoomoid opened this issue Mar 17, 2024 · 1 comment
Closed

[v4] max-w-screen-* utilities are not provided by default #13267

zoomoid opened this issue Mar 17, 2024 · 1 comment
Labels

Comments

@zoomoid
Copy link

zoomoid commented Mar 17, 2024

What version of Tailwind CSS are you using?

v4.0.0-alpha.9

What build tool (or framework if it abstracts the build tool) are you using?

@tailwindcss/postcss 4.0.0-alpha.9, Next.js 14.1.3

What version of Node.js are you using?

v20.11.0

What browser are you using?

Chrome, Firefox, Safari

What operating system are you using?

macOS

Reproduction URL

Clone the NextJS repo at https://github.com/zoomoid/tailwindcss-4-experiments and run the project in missing-screen-widths. Observe that the first <div> using max-w-md works as intended, whereas the second <div> using max-w-screen-md (which worked fine in < 4.0.0) has no utility for its max-width.

Describe your issue

max-w-screen-* utilities for using the breakpoints as max-widths are currently not included in the set of widths in packages/tailwindcss/theme.css. Afaik those aren't noted as being deprecated.

You can add them via the @theme directive by adding

--width-screen-sm: var(--breakpoint-sm);
--width-screen-md: var(--breakpoint-md);
--width-screen-lg: var(--breakpoint-lg);
--width-screen-xl: var(--breakpoint-xl);
--width-screen-2xl: var(--breakpoint-2xl);

or for any additional breakpoints created by yourself following the same schema. Afterwards, max-w-screen-* will work as expected again.

@zoomoid zoomoid changed the title max-w-screen-* utilities are not provided by default [v4] max-w-screen-* utilities are not provided by default Mar 17, 2024
@zoomoid
Copy link
Author

zoomoid commented Apr 5, 2024

Closing this as #13395 is closed

@zoomoid zoomoid closed this as completed Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants