From 4ebfce8b9f52fba5af43d97bf048b88942ec59d0 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Sat, 5 Mar 2022 11:58:09 -0500 Subject: [PATCH] =?UTF-8?q?initial=20commit=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 17 +++++++++ .gitattributes | 2 + .gitignore | 5 +++ LICENSE | 19 ++++++++++ README.md | 3 ++ index.d.ts | 5 +++ index.js | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 28 ++++++++++++++ 8 files changed, 178 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 index.d.ts create mode 100644 index.js create mode 100644 package.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7307990 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# http://editorconfig.org + +# this file is the top-most editorconfig file +root = true + +# all files +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true + +# site content +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7ee2532 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Set default behavior to automatically normalize line endings. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e47d516 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +node_modules/ +yarn.lock +.npmrc +.vscode/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..488f331 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2022 Jake Jarvis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..86f25bd --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# stitches-normalize + +@sindresorhus's modern-normalize.css as a plug-and-play JavaScript object compatible with Stitches. diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..137b83a --- /dev/null +++ b/index.d.ts @@ -0,0 +1,5 @@ +import * as Stitches from "@stitches/react"; + +declare const normalizeCss: Record[]; + +export default normalizeCss; diff --git a/index.js b/index.js new file mode 100644 index 0000000..f95b4fb --- /dev/null +++ b/index.js @@ -0,0 +1,99 @@ +/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ +// ...as of this commit: +// https://github.com/sindresorhus/modern-normalize/blob/b59ec0d3d8654cbb6843bc9ea45aef5f1d680108/modern-normalize.css + +/** @type {Record[]} */ +module.exports = [ + { + "*, ::before, ::after": { + boxSizing: "border-box", + }, + html: { + lineHeight: 1.15, + tabSize: 4, + WebkitTextSizeAdjust: "100%", + }, + body: { + margin: 0, + fontFamily: "system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'", + }, + hr: { + height: 0, + color: "inherit", + }, + "abbr[title]": { + textDecoration: "underline dotted", + }, + "b, strong": { + fontWeight: "bolder", + }, + "code, kbd, samp, pre": { + fontFamily: "ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace", + fontSize: "1em", + }, + small: { + fontSize: "80%", + }, + "sub, sup": { + fontSize: "75%", + lineHeight: 0, + position: "relative", + verticalAlign: "baseline", + }, + sub: { + bottom: "-0.25em", + }, + sup: { + top: "-0.5em", + }, + table: { + textIndent: 0, + borderColor: "inherit", + }, + "button, input, optgroup, select, textarea": { + fontFamily: "inherit", + fontSize: "100%", + lineHeight: 1.15, + margin: 0, + }, + "button, select": { + textTransform: "none", + }, + "button, [type='button'], [type='reset'], [type='submit']": { + WebkitAppearance: "button", + }, + "::-moz-focus-inner": { + borderStyle: "none", + padding: 0, + }, + ":-moz-focusring": { + outline: "1px dotted ButtonText", + }, + ":-moz-ui-invalid": { + boxShadow: "none", + }, + legend: { + padding: 0, + }, + progress: { + verticalAlign: "baseline", + }, + summary: { + display: "list-item", + }, + "[type='search']": { + outlineOffset: -2, + WebkitAppearance: "textfield", + }, + "::-webkit-search-decoration": { + WebkitAppearance: "none", + }, + "::-webkit-inner-spin-button, ::-webkit-outer-spin-button": { + height: "auto", + }, + "::-webkit-file-upload-button": { + font: "inherit", + WebkitAppearance: "button", + }, + }, +]; diff --git a/package.json b/package.json new file mode 100644 index 0000000..5a6bdee --- /dev/null +++ b/package.json @@ -0,0 +1,28 @@ +{ + "name": "stitches-normalize", + "version": "0.0.0", + "description": "@sindresorhus's modern-normalize.css as a plug-and-play JavaScript object compatible with Stitches.", + "license": "MIT", + "author": { + "name": "Jake Jarvis", + "email": "jake@jarv.is", + "url": "https://github.com/jakejarvis" + }, + "repository": { + "type": "git", + "url": "https://github.com/jakejarvis/stitches-normalize.git" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "types": "./index.d.ts", + "devDependencies": { + "@stitches/react": "^1.2.7" + }, + "peerDependencies": { + "@stitches/react": "1.x" + }, + "keywords": [] +}