4 <meta name="viewport" content="initial-scale=1, viewport-fit=cover">
5 <title>Designing Websites for iPhone X: Respecting the safe areas</title>
6 <link rel="stylesheet" type="text/css" href="style.css">
9 background-color: #729fcf;
10 padding: constant(safe-area-inset-top) constant(safe-area-inset-right) 0 constant(safe-area-inset-left);
14 display: inline-block;
19 border-right: 3px solid rgba(255, 255, 255, 0.5);
22 text-decoration: none;
27 #topBar a:last-child {
38 background-color: #3465a4;
43 padding-left: constant(safe-area-inset-left);
44 padding-right: constant(safe-area-inset-right);
45 padding-bottom: constant(safe-area-inset-bottom);
53 text-decoration: none;
74 padding-left: constant(safe-area-inset-left);
75 padding-right: constant(safe-area-inset-right);
84 <div id="topBar"><a href="#">Blog</a><a href="#">Photos</a><a href="#">Projects</a></div>
87 <h2>two hours ago</h2>
89 <p>Welcome to my sample blog!</p>
90 <p>This post is here to help demonstrate how easy it is to take an existing site, along with full-width bars and fixed-position elements, and make it take full advantage of iPhone X's edge-to-edge display.</p>
91 <p>The actual post describing how to adopt the new API is over on the <a href="#">WebKit blog</a>.</p>
92 <p>There, you will learn all about new WebKit features, including <code>viewport-fit</code>, <code>constant()</code>, safe area insets, and <code>min()</code> and <code>max()</code>.</p>
93 <p>I hope that it helps you adopt these new features in your websites.</p>
95 <div id="bottomBar"><a href="#">About Me</a><a href="#">Contact</a><a href="#">Site Map</a></div>