Rework SiteTitle styling

This commit is contained in:
2021-11-30 20:26:40 +01:00
parent f95d793d58
commit a7eb9782f5
3 changed files with 35 additions and 36 deletions

View File

@@ -20,20 +20,14 @@
threshold: 0, threshold: 0,
}} }}
> >
<strong class="mask"> <SplitText text="Houses" mode="chars" class="pink mask" />
<SplitText text="Houses" mode="chars" /> <SplitText text="Of The" mode="chars" class="middle mask" />
</strong> <SplitText text="World" mode="chars" class="pink mask" />
<span class="mask">
<SplitText text="Of The" mode="chars" />
</span>
<strong class="mask">
<SplitText text="World" mode="chars" />
</strong>
</h1> </h1>
{:else} {:else}
<div class="site-title site-title--{variant}"> <div class="site-title site-title--{variant}">
<strong>Houses</strong> <span class="word-1">Houses</span>
<span>Of The</span> <span class="middle word-2">Of The</span>
<strong>World</strong> <span class="word-3">World</span>
</div> </div>
{/if} {/if}

View File

@@ -1,10 +1,10 @@
.site-title { .site-title {
font-family: $font-serif; font-family: $font-serif;
& > strong { .pink {
font-weight: 300; font-weight: 300;
} }
& > span { .middle {
position: relative; position: relative;
top: -4px; top: -4px;
font-weight: 600; font-weight: 600;
@@ -31,43 +31,41 @@
font-size: clamp(#{rem(20px)}, 2.5vw, #{rem(30px)}); font-size: clamp(#{rem(20px)}, 2.5vw, #{rem(30px)});
} }
strong { .word-1 {
&:first-child {
display: block; display: block;
color: $color-lilas-bright; color: $color-lilas-bright;
} }
&:last-child { .word-2 {
font-size: 0.45em;
}
.word-3 {
display: inline-block; display: inline-block;
margin-left: -0.023em; margin-left: -0.023em;
color: $color-secondary; color: $color-secondary;
} }
}
span { span {
font-size: 0.45em;
}
strong, span {
transition: color 0.25s; transition: color 0.25s;
} }
} }
// Inline Variant // Inline Variant
&--inline { &--inline {
display: block; display: block;
align-items: baseline; align-items: baseline;
color: $color-lightpurple; color: $color-lightpurple;
justify-content: center; justify-content: center;
font-size: rem(64px); font-size: rem(52px);
@include bp (mob-lg) {
font-size: rem(64px);
}
@include bp (sm) { @include bp (sm) {
display: flex; display: flex;
font-size: rem(96px); font-size: rem(96px);
} }
& > strong { .middle {
color: $color-secondary;
}
& > span {
// display: block;
top: 0; top: 0;
margin: 10px 0; margin: 10px 0;
font-size: 0.3125em; font-size: 0.3125em;
@@ -77,5 +75,8 @@
margin: 0 10px 0 20px; margin: 0 10px 0 20px;
} }
} }
.char {
transition: none;
}
} }
} }

View File

@@ -29,13 +29,17 @@
margin: auto 0; margin: auto 0;
} }
// hover .site-title {
.site-title:hover { line-height: 1;
// Hover
&:hover {
strong, span { strong, span {
color: #fff; color: #fff;
} }
} }
} }
}
// Links // Links
&__links { &__links {