Skip to content

Instantly share code, notes, and snippets.

@leeleoo
Last active April 23, 2017 04:30
Show Gist options
  • Save leeleoo/324a9fd4e1204d3e5b6c2053d1f70195 to your computer and use it in GitHub Desktop.
Save leeleoo/324a9fd4e1204d3e5b6c2053d1f70195 to your computer and use it in GitHub Desktop.
PmzBNe
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
</head>
<body>
<div id='div'></div>
</body>
</html>
@mixin onePxBorder($padding)
position: relative
&:after
content: ''
position: absolute
left: -50%
top: -50%
width: 200%
height: 200%
transform: scale(.5) translate3d(-$padding ,-$padding,0)
padding: $padding / 2
@content
#div
height: 300px
width: 300px
background: #33e
@include onePxBorder(1rem)
border-top: 1px solid #333
@leeleoo
Copy link
Author

leeleoo commented Apr 23, 2017

a sass mixin for mobile 1px border

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment