Skip to content

Commit f3fc621

Browse files
committed
Updates styles
1 parent 6b1f3d1 commit f3fc621

File tree

8 files changed

+224
-41
lines changed

8 files changed

+224
-41
lines changed

assets/bundle.js

Lines changed: 115 additions & 34 deletions
Large diffs are not rendered by default.

assets/styles/site.css

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@
9696
--elevation-modal: 1300;
9797
--elevation-popover: 1400;
9898

99+
/* roundness tokens */
100+
--roundness-none: 0;
101+
--roundness-sm: var(--size--5);
102+
--roundness-md: var(--size--2);
103+
--roundness-lg: var(--size-0);
104+
--roundness-xl: var(--size-20);
105+
99106
/* raw color tokens */
100107
--color-raw-blue-05: rgb(2, 17, 38);
101108
--color-raw-blue-10: rgb(4, 28, 56);
@@ -143,6 +150,11 @@
143150
--color-link-hover-foreground: var(--color-raw-blue-40);
144151
--color-link-visited-foreground: color-mix(in srgb, var(--color-raw-blue-50) 65%, var(--color-raw-red-50));
145152

153+
--color-action-foreground: var(--color-raw-blue-50);
154+
--color-action-background: var(--color-raw-blue-10);
155+
--color-action-hover-foreground: var(--color-raw-blue-50);
156+
--color-action-hover-background: var(--color-raw-blue-20);
157+
146158
--color-secondary-foreground: var(--color-raw-neutral-10);
147159
--color-secondary-background: var(--color-raw-neutral-90);
148160

@@ -168,7 +180,7 @@
168180
--color-link-visited-foreground: color-mix(in srgb, var(--color-raw-blue-50) 65%, var(--color-raw-red-50));
169181

170182
--color-secondary-foreground: var(--color-raw-neutral-90);
171-
--color-secondary-background: var(--color-raw-neutral-20);
183+
--color-secondary-background: var(--color-raw-neutral-05);
172184

173185
--color-footer-foreground: var(--color-raw-neutral-70);
174186
--color-footer-background: #000;
@@ -407,6 +419,7 @@ kbd kbd {
407419
gap: var(--spacing-sm);
408420
padding-inline: var(--spacing-md);
409421
padding-block: var(--spacing-sm);
422+
-webkit-backdrop-filter: blur(8px);
410423
backdrop-filter: blur(8px);
411424
}
412425
.header--pinned {
@@ -440,7 +453,7 @@ kbd kbd {
440453
align-items: flex-start;
441454
gap: var(--spacing-md);
442455
padding-inline: var(--spacing-md);
443-
padding-block: var(--spacing-sm);
456+
padding-block: var(--spacing-xl);
444457
background-color: var(--color-footer-background);
445458
color: var(--color-footer-foreground);
446459
}

index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,11 @@ <h3 slot="title">Cruise Microsite</h3>
336336
</section>
337337
<section id="contact" class="contact">
338338
<div class="container">
339-
<h2>Contact</h2>
340-
<p>Drop me a line</p>
339+
<h2 class="h-type-tight">
340+
Contact
341+
<small class="h-block">Let me know what I can do for you</small>
342+
</h2>
343+
341344
<nav>
342345
<kd-link-button href="tel:19548052603">Call</kd-link-button>
343346
<kd-link-button href="mailto:[email protected]">Email</kd-link-button>

scripts/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import esbuildPluginTsc from 'esbuild-plugin-tsc';
44
export function createBuildSettings(options) {
55
const plugins = [
66
esbuildPluginTsc({
7-
force: true,
7+
force: false,
88
}),
99
];
1010

src/components/button/button.css.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,24 @@ export const buttonBase = css`
66
}
77
88
.button {
9+
box-sizing: border-box;
910
appearance: none;
1011
display: inline-block;
12+
padding: var(--spacing-xs) var(--spacing-md);
13+
color: var(--color-action-foreground);
14+
background-color: var(--color-action-background);
15+
border: 1px solid transparent;
16+
transition: background-color 0.2s ease;
17+
text-align: center;
18+
}
19+
20+
.button:hover {
21+
color: var(--color-action-hover-foreground);
22+
background-color: var(--color-action-hover-background);
23+
}
24+
25+
.button:focus {
26+
outline: 1px solid var(--color-focus-foreground);
27+
outline-offset: 1px;
1128
}
1229
`;

src/components/life-events/life-event.ts

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,74 @@ export class KdLifeEvent extends KdBaseElement {
9797
9898
.event {
9999
flex: 1;
100+
min-width: 0;
100101
display: flex;
101102
flex-direction: column;
102103
gap: var(--spacing-lg);
103104
}
104105
106+
@media (min-width: 800px) {
107+
.event {
108+
display: grid;
109+
grid-template-columns: 3fr 4fr;
110+
grid-template-rows: auto;
111+
grid-template-areas:
112+
'summary media'
113+
'meta meta';
114+
gap: var(--spacing-lg) var(--spacing-xl);
115+
}
116+
}
117+
105118
.date-range {
106119
line-height: 1;
107120
}
108121
122+
.media-zone {
123+
grid-area: media;
124+
}
125+
126+
.media-container {
127+
position: relative;
128+
overflow: hidden;
129+
}
130+
109131
.media {
110132
max-inline-size: 100%;
111133
block-size: auto;
134+
vertical-align: middle;
135+
}
136+
137+
@media (min-width: 800px) {
138+
.media {
139+
width: 100%;
140+
aspect-ratio: 16 / 9;
141+
/* height: 100%; */
142+
object-fit: contain;
143+
object-position: center;
144+
}
145+
}
146+
147+
.media-cover {
148+
position: absolute;
149+
width: 100%;
150+
aspect-ratio: 16 / 9;
151+
/* height: 100%; */
152+
object-fit: cover;
153+
object-position: center;
154+
z-index: var(--elevation-behind);
155+
filter: blur(16px) saturate(50%);
156+
opacity: 0.2;
157+
}
158+
159+
@media (max-width: 799px) {
160+
.media-cover {
161+
display: none;
162+
}
112163
}
113164
114165
.summary {
166+
grid-area: summary;
167+
display: block;
115168
}
116169
117170
.title {
@@ -124,6 +177,7 @@ export class KdLifeEvent extends KdBaseElement {
124177
}
125178
126179
.meta {
180+
grid-area: meta;
127181
display: block;
128182
}
129183
@@ -180,14 +234,24 @@ export class KdLifeEvent extends KdBaseElement {
180234
</div>`;
181235
}
182236

237+
private renderMedia() {
238+
if (this.asset === undefined) return nothing;
239+
return html`<div class="media-zone">
240+
<div class="media-container">
241+
<img class="media-cover" src="${this.asset}" alt="" />
242+
<img class="media" src="${this.asset}" alt="" />
243+
</div>
244+
</div>`;
245+
}
246+
183247
override render() {
184248
return html`
185249
<div class="timeline-zone">
186250
<span class="year2">${this.endingDate?.getFullYear()}</span>
187251
<span class="event-tag"></span>
188252
</div>
189253
<article class="event">
190-
${this.asset ? html`<img class="media" src="${this.asset}" alt="" />` : nothing}
254+
${this.renderMedia()}
191255
<div class="summary">
192256
${this.renderDateRange()}
193257
<slot name="title" class="title"></slot>

src/components/life-events/life-events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class KdLifeEvents extends KdBaseElement {
4848
.events {
4949
display: flex;
5050
flex-direction: column;
51-
gap: var(--spacing-xl);
51+
gap: var(--size-5);
5252
}
5353
`,
5454
];

src/components/phone-hero/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import { KdBaseElement } from '../base/base-element';
55
@customElement('kd-phone-hero')
66
export class KdPhoneHero extends KdBaseElement {
77
static override styles = css`
8+
*,
9+
*::before,
10+
*::after {
11+
box-sizing: border-box;
12+
}
813
:host {
914
--kd-phone-hero-block-offset: 12vh;
1015
--kd-phone-hero-content-width: 80;

0 commit comments

Comments
 (0)