Skip to content

Commit

Permalink
adding min, max, clamp example
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdavidmills committed Apr 5, 2020
1 parent ddb0074 commit fe941d7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions min-max-clamp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>min(), max(), clamp() playground</title>
<style>
html {
font-family: sans-serif;
}

body {
margin: 0 auto;
width: min(1000px, calc(70% + 100px));
}

h1 {
letter-spacing: 2px;
font-size: clamp(1.8rem, 2.5vw, 2.8rem)
}

p {
line-height: 1.5;
font-size: max(1.2rem, 1.2vw);
}
</style>
</head>
<body>
<h1>Simple responsive test</h1>
<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. In orci orci, eleifend id risus nec, mattis rutrum velit. Suspendisse fringilla egestas erat eu convallis. Phasellus eu velit ut magna dapibus elementum cursus at ligula. Ut tempus varius nibh, nec auctor sapien iaculis sit amet. Fusce iaculis, libero quis elementum viverra, nulla ante accumsan lectus, sit amet convallis lacus ipsum vel est. Curabitur et urna non est consectetur pulvinar vel id risus. Ut vestibulum, sem in semper aliquet, felis arcu euismod sapien, ac imperdiet massa nisl quis sem. Vestibulum ac elementum felis, in tempor velit. Pellentesque purus ex, mattis at ornare quis, porta condimentum mi. Donec vestibulum ligula vel nulla blandit, quis euismod nulla vestibulum. Suspendisse potenti. Nunc neque mauris, tempor sed facilisis at, ultrices eget nulla. Pellentesque convallis ante nec augue porttitor, id tempus ante luctus.</p>

<p>Integer rutrum sollicitudin tellus, quis cursus nulla scelerisque nec. Nunc eu facilisis lorem. Maecenas faucibus sapien eleifend, semper tellus at, pharetra quam. Cras feugiat vulputate tortor at rhoncus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam non felis quis sem lobortis sodales vel id libero. Phasellus sit amet placerat lorem. </p>
</body>
</html>

0 comments on commit fe941d7

Please sign in to comment.