Skip to content

Commit 8711a36

Browse files
committed
Add logo to demo site
1 parent 13113b3 commit 8711a36

4 files changed

Lines changed: 133 additions & 0 deletions

File tree

demo/img/logo-dark.svg

Lines changed: 37 additions & 0 deletions
Loading

demo/img/logo.svg

Lines changed: 37 additions & 0 deletions
Loading

demo/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
</button>
3535
</div>
3636
<header>
37+
<span class="h1-logo-icon">
38+
<img class="logo-light" src="img/logo.svg" alt="View Transitions Toolkit Logo" height="200" width="200">
39+
<img class="logo-dark" src="img/logo-dark.svg" alt="View Transitions Toolkit Logo" height="200" width="200">
40+
</span>
3741
<h1>View Transitions Toolkit</h1>
3842
<p class="description">
3943
A collection of utility functions to more easily work with View Transitions.

demo/styles.css

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,61 @@ h1 {
111111
line-height: 1.1;
112112
}
113113

114+
.h1-logo-icon {
115+
display: inline-block;
116+
width: 20rem;
117+
height: 20rem;
118+
vertical-align: middle;
119+
margin-right: 0.5rem;
120+
position: relative;
121+
122+
img {
123+
width: 100%;
124+
height: 100%;
125+
}
126+
}
127+
128+
html[data-theme="light"] .h1-logo-icon {
129+
.logo-light {
130+
display: inline-block;
131+
}
132+
133+
.logo-dark {
134+
display: none;
135+
}
136+
}
137+
138+
html[data-theme="dark"] .h1-logo-icon {
139+
.logo-light {
140+
display: none;
141+
}
142+
143+
.logo-dark {
144+
display: inline-block;
145+
}
146+
}
147+
148+
html[data-theme="system"] .h1-logo-icon {
149+
@media (prefers-color-scheme: light) {
150+
.logo-light {
151+
display: inline-block;
152+
}
153+
154+
.logo-dark {
155+
display: none;
156+
}
157+
}
158+
@media (prefers-color-scheme: dark) {
159+
.logo-light {
160+
display: none;
161+
}
162+
163+
.logo-dark {
164+
display: inline-block;
165+
}
166+
}
167+
}
168+
114169
.description {
115170
font-size: 1.25rem;
116171
color: var(--text-secondary);

0 commit comments

Comments
 (0)