Skip to content

Commit e884d69

Browse files
committed
style: improve responsive spacing and display classes
Update home page and CSS to use responsive utility classes for spacing and display. Refactor margin and block styles for better layout across screen sizes.
1 parent d98d72d commit e884d69

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

app/home/templates/home/index.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,10 @@
2626
</div>
2727
</div>
2828
</section>
29-
<img src="{% static 'img/vectors/footer.png' %}"
30-
class="w-full block"
31-
style="margin-top: -10em;
32-
margin-bottom: -7em">
29+
<img src="{% static 'img/vectors/footer.png' %}" class="w-full block xl:mt-[-10em] xl:mb-[-7em]">
3330
</main>
3431
<!-- Section Break -->
35-
<div class="w-full py-0 my-0 z-10 -mb-25">
32+
<div class="w-full py-0 my-0 z-10 -mb-25 hidden xl:block">
3633
<img src="{% static 'img/vectors/section-break-1.svg' %}"
3734
alt="Section Break"
3835
class="w-full block">

static/css/app.css

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
--container-5xl: 64rem;
1616
--container-6xl: 72rem;
1717
--container-7xl: 80rem;
18-
--text-sm: 16px;
18+
--text-sm: 0.875rem;
1919
--text-sm--line-height: calc(1.25 / 0.875);
20-
--text-base: 18px;
20+
--text-base: 1rem;
2121
--text-base--line-height: calc(1.5 / 1);
2222
--text-lg: 1.125rem;
2323
--text-lg--line-height: calc(1.75 / 1.125);
@@ -1811,6 +1811,16 @@
18111811
}
18121812
}
18131813
}
1814+
.md\:mt-\[-10em\] {
1815+
@media (width >= 48rem) {
1816+
margin-top: -10em;
1817+
}
1818+
}
1819+
.md\:mb-\[-7em\] {
1820+
@media (width >= 48rem) {
1821+
margin-bottom: -7em;
1822+
}
1823+
}
18141824
.md\:block {
18151825
@media (width >= 48rem) {
18161826
display: block;
@@ -1848,6 +1858,11 @@
18481858
line-height: var(--tw-leading, var(--text-6xl--line-height));
18491859
}
18501860
}
1861+
.lg\:block {
1862+
@media (width >= 64rem) {
1863+
display: block;
1864+
}
1865+
}
18511866
.lg\:flex {
18521867
@media (width >= 64rem) {
18531868
display: flex;
@@ -1887,6 +1902,21 @@
18871902
line-height: var(--tw-leading, var(--text-6xl--line-height));
18881903
}
18891904
}
1905+
.xl\:mt-\[-10em\] {
1906+
@media (width >= 80rem) {
1907+
margin-top: -10em;
1908+
}
1909+
}
1910+
.xl\:mb-\[-7em\] {
1911+
@media (width >= 80rem) {
1912+
margin-bottom: -7em;
1913+
}
1914+
}
1915+
.xl\:block {
1916+
@media (width >= 80rem) {
1917+
display: block;
1918+
}
1919+
}
18901920
}
18911921
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&display=swap");
18921922
body {

0 commit comments

Comments
 (0)