Skip to content

Commit

Permalink
👌 FB_JL: order template > script > style
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianWilms committed May 8, 2024
1 parent 3515f75 commit b2de5b3
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/components/Card/MucCardContainer.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
<script setup lang="ts"></script>

<template>
<div class="container card-container">
<slot />
<slot/>
</div>
</template>

<script setup lang="ts">
defineSlots<{
/**
* MucCards can be put into this slot.
*/
default(): any;
}>();
</script>

<style scoped>
@media all and (min-width: 992px) {
.card-container {
padding-left: 0;
padding-right: 0;
display: grid;
/* here you set when the width should change to be moved to the next row, in this example, the divs will move when the screen reduces size and their width is less than 200px */
grid-template-columns: repeat(auto-fit, 384px);
grid-column-gap: 32px;
grid-row-gap: 32px;
Expand All @@ -24,7 +30,6 @@
padding-left: 0;
padding-right: 0;
display: inline-grid;
/* here you set when the width should change to be moved to the next row, in this example, the divs will move when the screen reduces size and their width is less than 200px */
grid-template-columns: 1fr;
grid-row-gap: 32px;
}
Expand Down

0 comments on commit b2de5b3

Please sign in to comment.