Skip to content

Instantly share code, notes, and snippets.

View procarrera's full-sized avatar

Pedro Carrera procarrera

View GitHub Profile
@procarrera
procarrera / material-design-shadows.css
Created August 10, 2022 18:16 — forked from serg0x/material-design-shadows.css
Google material design elevation system shadows as css. Based on https://material.io/design/environment/elevation.html#default-elevations Exported with Sketchapp from the Google material design theme editor plugin "Baseline" theme.
/* Shadow 0dp */
box-shadow: none;
/* Shadow 1dp */
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20);
/* Shadow 2dp */
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.20);
/* Shadow 3dp */
<form onsubmit="validateZipCode(); return false;">
<input type="text" id="zipcode" placeholder="Enter zipcode here ..." />
<input type="submit" value="Go" />
</form>
<script type="text/javascript">
function validateZipCode(e) {
const zipcode = document.getElementById('zipcode').value;
if (typeof window.Zapiet === 'undefined' || typeof window.ZapietCachedSettings === 'undefined' ||