4 <meta name="viewport" content="initial-scale=1, viewport-fit=cover">
5 <title>Designing Websites for iPhone X: min() and max()</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;
50 text-decoration: none;
77 @supports(padding: max(0px)) {
79 padding-left: max(8px, constant(safe-area-inset-left));
80 padding-right: max(8px, constant(safe-area-inset-right));
81 padding-bottom: max(8px, constant(safe-area-inset-bottom));
85 padding-left: max(12px, constant(safe-area-inset-left));
86 padding-right: max(12px, constant(safe-area-inset-right));
92 <div id="topBar"><a href="#">Blog</a><a href="#">Photos</a><a href="#">Projects</a></div>
95 <h2>two hours ago</h2>
97 <p>Welcome to my sample blog!</p>
98 <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>
99 <p>The actual post describing how to adopt the new API is over on the <a href="#">WebKit blog</a>.</p>
100 <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>
101 <p>I hope that it helps you adopt these new features in your websites.</p>
103 <div id="bottomBar"><a href="#">About Me</a><a href="#">Contact</a><a href="#">Site Map</a></div>