Skip to content

Instantly share code, notes, and snippets.

@jithine
Created February 6, 2014 03:11
Show Gist options
  • Save jithine/8837852 to your computer and use it in GitHub Desktop.
Save jithine/8837852 to your computer and use it in GitHub Desktop.
calc() decimal caveats
.parent {
width: 128.75px;
}
.child {
width: calc(100% - 10px);
height: 30px;
background-color: blue;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="parent">
<div class="child">
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment