Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 1 KB

readme.md

File metadata and controls

16 lines (11 loc) · 1 KB

Rounded App Corners — SCSS Mixin

A simple, scalable SCSS mixin to give your web app rounded corners against the device's screen edges.

Live demo

A live demo of the mixin in use can be found here.

Usage

The mixin depends on 2 extra elements in your HTML markup. Inside your body tag, preferably just before the closing /body tag, add the following div's:

<div id="topCorners"></div>
<div id="bottomCorners"></div>

The mixin takes 1 argument: the size of the radius. Simply add @include _roundedAppCorners(15px) to your CSS styles for body{}. For bigger or smaller radii, simply replace 15px with any other number. Sticking with px as unit works best.

Disclaimer

This mixin relies on SVG embedded as Base64 and pseudo-elements. If the browser doesn't support any of these technologies, the mixin will break. It's tested on Mac and iOS only, and works beautifully on those platforms. No guarantees for other platforms.