Skip to content

Commit 1c76938

Browse files
committed
refactor: some optimizations
1 parent 492d32f commit 1c76938

File tree

2 files changed

+39
-11
lines changed

2 files changed

+39
-11
lines changed

db-ux-design-system.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ <h3 data-variant="light">
150150
<section id="section-storytime" class="section-with-max-width">
151151
<h2>With arms wide open</h2>
152152
<div>
153-
<img src="assets/custom/box.svg" alt="" width="111" height="122" />
154153
<p>
155154
Truth be told, it wasn't easy. Companies like Deutsche Bahn –
156155
running for more than a century – have more walls than meet the eye,
@@ -173,7 +172,7 @@ <h2>With arms wide open</h2>
173172
</p>
174173
</div>
175174
</section>
176-
<section class="section-with-max-width">
175+
<section id="section-talk-to-us" class="section-with-max-width">
177176
<h2>Talk to us!</h2>
178177
<ul>
179178
<li>

styles/styles.css

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
h1,
2+
h2,
3+
h3,
4+
h4,
5+
h5,
6+
h6 {
7+
text-align: center;
8+
}
9+
110
.landing {
211
display: flex;
312
flex-direction: column;
@@ -36,7 +45,11 @@
3645
align-items: center;
3746
justify-content: center;
3847
gap: var(--db-spacing-fixed-xl);
39-
margin-block: var(--db-spacing-fixed-xl);
48+
margin-block-start: var(--db-spacing-fixed-2xl, 48px);
49+
50+
background: var(--db-adaptive-background-level-2--enabled, #f8f8f9);
51+
52+
padding-block: var(--db-spacing-fixed-2xl, 48px);
4053

4154
/* 45rem are ~768 px for tablet*/
4255
@media screen and (min-width: 45rem) {
@@ -61,7 +74,7 @@
6174
border-block-end: var(--db-border-height-lg) solid
6275
var(--db-brand-origin-enabled);
6376
inset-block-end: calc(-1 * var(--db-spacing-fixed-xs));
64-
inline-size: var(--db-sizing-2xl);
77+
inline-size: 72px;
6578
block-size: auto;
6679
inset-inline-start: 50%;
6780
inset-block-start: auto;
@@ -118,16 +131,29 @@
118131
text-decoration: none;
119132
}
120133

134+
#section-main-features {
135+
> ul {
136+
/* 64rem are ~1024 px for desktop-small*/
137+
max-inline-size: 64rem;
138+
}
139+
}
140+
121141
#section-vision {
122142
> div {
123143
padding: var(--db-spacing-fixed-md);
124144
display: flex;
125145
flex-direction: column;
126146
align-items: center;
127-
border-radius: var(--db-border-radius-md);
147+
border-radius: var(--db-border-radius-lg);
148+
inline-size: 100%;
149+
/* 64rem are ~1024 px for desktop-small*/
150+
max-inline-size: 64rem;
128151

129152
> h3 {
130153
text-align: center;
154+
/* 45rem are ~768 px for tablet*/
155+
max-inline-size: 45rem;
156+
text-wrap: balance;
131157
}
132158
}
133159
}
@@ -138,18 +164,21 @@
138164
flex-direction: column;
139165
gap: var(--db-spacing-fixed-2xl);
140166
padding-inline: var(--db-spacing-fixed-lg);
141-
142-
/* 45rem are ~768 px for tablet*/
143-
@media screen and (min-width: 45rem) {
144-
flex-direction: row;
145-
}
167+
margin-inline: auto;
146168
}
147169

148170
p {
149-
max-inline-size: 40rem;
171+
/* 45rem are ~768 px for tablet*/
172+
max-inline-size: 45rem;
150173
}
151174
}
152175

176+
#section-talk-to-us {
177+
/* 64rem are ~1024 px for desktop-small*/
178+
max-inline-size: 64rem;
179+
margin-inline: auto;
180+
}
181+
153182
.section-with-max-width {
154183
padding-inline: var(--db-spacing-responsive-md);
155184
}

0 commit comments

Comments
 (0)