Skip to content

Instantly share code, notes, and snippets.

@gregwhitworth
gregwhitworth / example-css-usage.json
Created July 22, 2020 20:43
Shows a basic css usage for a website
This file has been truncated, but you can view the full file.
{
"types": [
0,
10003,
0,
3,
113,
47,
0,
24,
@gregwhitworth
gregwhitworth / get-shopify-urls.js
Last active April 25, 2020 19:47
Get URLs to all Shopify urls
/*
Go to your files page under Settings -> Files
Open the devtools and run this script
You'll then inputTextArr which is an array of all CDN values for files on the page.
*/
let anchors = []
let inputTextArr = [];
let images = [];
@gregwhitworth
gregwhitworth / index.html
Created December 7, 2017 04:47
Variable Fonts playground made with Mavo
<p>Variable Fonts</p>
@gregwhitworth
gregwhitworth / css-grid-example-of-longhands.css
Created October 24, 2017 16:35
css-grid-example-of-longhands
grid-template-rows: 1fr 1fr 1fr;
grid-template-columns: 1fr 1fr 1fr;
.puzzle-game {
display: grid;
grid-area: game;
align-self: start;
justify-self: center;
max-width: 35vw;
border: 10px solid cornflowerblue;
grid: 1fr 1fr 1fr / 1fr 1fr 1fr;
background: rgba(0, 0, 0, .5);
}
@gregwhitworth
gregwhitworth / creating-fallbacks.html
Created June 14, 2017 04:50
creating-fallbacks-for-IE
<!doctype html>
<html>
<head>
<title>Fallbacks!!!</title>
<style>
#test {
width: 100px;
height: 100px;
background: red;
}
div {
--primary: blue;
margin-top: var(--primary, 12px);
}
@gregwhitworth
gregwhitworth / custom-props-feature-detection.css
Last active March 17, 2017 17:32
custom-props-feature-detection.css
body {
background: red;
}
@supports(--foo: blue) {
body {
background: green;
}
}
@gregwhitworth
gregwhitworth / custom-props-feature-detection-2.css
Created February 27, 2017 23:30
custom-props-feature-detection-2.css
:root {
--foo: true;
}
body {
background: red;
}
@supports(--foo: false) {
body {
@gregwhitworth
gregwhitworth / custom-props-animate.css
Created February 27, 2017 23:57
custom-props-animate.css
div {
--pos: 0;
left: var(--pos);
animation: move 1s;
}
@keyframes move {
to {
--pos: 50px;
}