Skip to content

Commit

Permalink
tailwind container & grid
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-wildcard committed May 2, 2024
1 parent a34baa7 commit 5ae806f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/components/@common/Grid.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const { as: HTMLTag = "div", class: cssClasses, ...props } = Astro.props;
<HTMLTag
class:list={[
"grid",
"gap-x-5",
"grid-cols-6",
"lg:gap-x-8",
"grid-cols-4",
"gap-x-2.5",
"sm:grid-cols-8",
"sm:gap-x-5",
"lg:grid-cols-12",
"responsive-wrapper",
cssClasses,
]}
{...props}
Expand Down
11 changes: 9 additions & 2 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
---
import MainLayout from "layouts/main.astro";
import Grid from "components/@common/Grid.astro";
---

<MainLayout
title="Home sweet home"
title="Home"
description="Page description"
og_title="Open Graph Title"
og_description="Open Graph Description"
>
<p class="body-normal">Hey</p>
<div class="container">
<Grid>
<div class="bg-neutral3 col-span-full">
<div>Hey</div>
</div>
</Grid>
</div>
</MainLayout>
17 changes: 17 additions & 0 deletions src/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@
}

@layer utilities {
.container {
margin: 0 auto;
max-width: calc(100% - 40px);

@screen lg {
max-width: 904px;
}

@screen xl {
max-width: 1160px;
}

@screen 2xl {
max-width: 1320px;
}
}

.display-large-highlight {
font-size: 36px;
line-height: 120%;
Expand Down

0 comments on commit 5ae806f

Please sign in to comment.