Created
February 27, 2024 19:36
-
-
Save ryanmr/3b0fbb6d3d5ee9a5eee5546516c22964 to your computer and use it in GitHub Desktop.
an example of css modules vs tailwind; why not both in some cases?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="app-wrapper"> | |
<app-header></app-header> | |
<main class="main-content"> | |
<slot></slot> | |
</main> | |
<app-footer></app-footer> | |
</div> | |
</template> | |
<style module> | |
.app-wrapper { | |
min-height: 100vh; | |
display: grid; | |
grid-template-rows: min-content 1fr min-content; | |
} | |
.main-content { | |
display: flex; | |
flex-direction: column; | |
} | |
</style> | |
<!-- -------- | |
---- OR ----- | |
--------- --> | |
<template> | |
<div class="min-h-screen grid grid-rows-[min-content_1fr_min-content]"> | |
<app-header></app-header> | |
<main class="flex flex-col"> | |
<slot></slot> | |
</main> | |
<app-footer></app-footer> | |
</div> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment