This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const searchParamsToObject = (params: URLSearchParams) => { | |
const searchParamsAsObject: Record<string, string | string[]> = {} | |
Array.from(params.entries()).forEach(([key, value]) => { | |
const existingValue = searchParamsAsObject[key] | |
if (existingValue) { | |
searchParamsAsObject[key] = Array.isArray(existingValue) | |
? [...existingValue, value] | |
: [existingValue, value] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set up the next app. | |
yarn create next-app $1 --typescript | |
# cd into it. | |
cd $1 | |
# add tailwind and its deps | |
yarn add -D tailwindcss postcss autoprefixer postcss-import | |
# remove the default css file, we're going to replace it later |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$foo: theme('colors.red.400'); | |
.foo { | |
color: $foo; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--stroke-base: 255 0 0 | |
} | |
.foo { | |
color: rgba(var(--stroke-base)/0.15) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin button ($a, $b, $c) { | |
color: $a; | |
border: $b; | |
content: $c; | |
} | |
.foo { | |
@include button(#{theme('colors.white')}, 1px solid blue, 'hi') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.button-primary { | |
color: theme('colors.error.10'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.button-primary { | |
color: theme('primary'); | |
} |
NewerOlder