Skip to content

Instantly share code, notes, and snippets.

Avatar

Bill Criswell crswll

View GitHub Profile
View parseBoxShadowValue.diff
diff --git a/src/util/parseBoxShadowValue.js b/src/util/parseBoxShadowValue.js
index eb4872c7..5ed74a9e 100644
--- a/src/util/parseBoxShadowValue.js
+++ b/src/util/parseBoxShadowValue.js
@@ -1,58 +1,27 @@
-let KEYWORDS = new Set(['inset', 'inherit', 'initial', 'revert', 'unset'])
+let KEYWORDS = ['inset', 'inherit', 'initial', 'revert', 'unset']
let COMMA = /\,(?![^(]*\))/g // Comma separator that is not located between brackets. E.g.: `cubiz-bezier(a, b, c)` these don't count.
let SPACE = /\ +(?![^(]*\))/g // Similar to the one above, but with spaces instead.
-let LENGTH = /^-?(\d+)(.*?)$/g
@crswll
crswll / index.html
Last active Dec 22, 2021
A quick example of generating `:has()` variants with Tailwind. As of right now Safari Technology Preview is the only browser with support for `:has()` and there's currently a few bugs.
View index.html
<div class="group flex flex-col">
<label class="text-gray-500 group-has-disabled:text-red-500">Name</label>
<input class="border p-2" disabled />
</div>
@crswll
crswll / input.scss
Created Jul 14, 2021
Generated by SassMeister.com.
View input.scss
$foo: theme('colors.red.400');
.foo {
color: $foo;
}
@crswll
crswll / input.scss
Created Mar 25, 2021
Generated by SassMeister.com.
View input.scss
:root {
--stroke-base: 255 0 0
}
.foo {
color: rgba(var(--stroke-base)/0.15)
}
@crswll
crswll / input.scss
Created Mar 21, 2021
Generated by SassMeister.com.
View input.scss
@mixin button ($a, $b, $c) {
color: $a;
border: $b;
content: $c;
}
.foo {
@include button(#{theme('colors.white')}, 1px solid blue, 'hi')
}
@crswll
crswll / input.scss
Created Mar 4, 2021
Generated by SassMeister.com.
View input.scss
.button-primary {
color: theme('colors.error.10');
}
@crswll
crswll / input.scss
Created Mar 4, 2021
Generated by SassMeister.com.
View input.scss
.button-primary {
color: theme('primary');
}
View tailwind.css
This file has been truncated, but you can view the full file.
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
View cb
import bezier from "bezier-easing";
export const linear = bezier(0.5, 0.5, 0.5, 0.5);
export const easeInCubic = bezier(0.55, 0.055, 0.675, 0.19);
export const easeOutCubic = bezier(0.215, 0.61, 0.355, 1);
export const easeInOutCubic = bezier(0.645, 0.045, 0.355, 1);
export const easeInSine = bezier(0.47, 0, 0.745, 0.715);
export const easeOutSine = bezier(0.39, 0.575, 0.565, 1);