@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
/*max-h-80 max-height: 20rem;*/
/*max-h-96 max-height: 24rem;*/
/*max-h-full max-height: 100%;*/
/*max-h-screen max-height: 100vh;*/
/*I need to add custom class with different max-height like 34rem, 44rem depending on current devices.*/
@layer utilities {
.custom_height_sm {
height: 34rem;
}
}
@layer base {
.d1 {
@apply border-2 border-red-600;
}
.custom_height {
@apply sm:custom_height_sm md:custom_height_md d1 ;
}
But I got error in the console :
resources/css/app.css The `sm:custom_height_sm` class does not exist. If you're sure that `sm:custom_height_sm` exists, make sure that any `@import` statements are being properly processed before Tailwind CSS sees your CSS, as `@apply` can only be used for classes in the same CSS tree.
34 |
35 | .custom_height {
> 36 | @apply sm:custom_height_sm md:custom_height_md d1 ;
| ^
37 | }
38 |