From 7faf266340d07b2cdd4cc47d498962d6ae7810bc Mon Sep 17 00:00:00 2001
From: Craig Howell
Date: Sat, 8 Oct 2022 14:09:18 -0400
Subject: [PATCH] docs: updated installation section fix: removed unused
packages fix: added basic typography fix: removed tailwind typography from
everywhere
---
README.md | 1 +
package-lock.json | 69 -------------------
package.json | 2 -
src/lib/components/list/Title.svelte | 6 +-
src/lib/components/menu/Item.svelte | 5 +-
src/lib/components/post/Content.svelte | 2 +-
src/lib/components/post/Created.svelte | 3 +-
src/lib/components/post/Creator.svelte | 4 +-
src/lib/components/statistic/Statistic.svelte | 2 +-
src/lib/plugin/index.js | 19 +++++
src/routes/+page.svelte | 6 +-
src/routes/alert/+page.svelte | 2 +-
src/routes/alert/examples.ts | 2 +-
src/routes/installation/+page.svelte | 26 +++----
tailwind.config.cjs | 7 +-
15 files changed, 45 insertions(+), 111 deletions(-)
diff --git a/README.md b/README.md
index 736ad3f0..137ea907 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,7 @@ A showcase can be found at `https://stwui.vercel.app/`. Documentation is still f
module.exports = {
content: ['./src/**/*.{html,js,svelte,ts}'],
plugins: [
+ require('@tailwindcss/forms'),
require('stwui/plugin')
],
darkMode: 'class'
diff --git a/package-lock.json b/package-lock.json
index 252a8fa5..eefb7b3b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -21,9 +21,7 @@
"@sveltejs/adapter-vercel": "next",
"@sveltejs/kit": "next",
"@sveltejs/package": "1.0.0-next.5",
- "@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.3",
- "@tailwindcss/typography": "^0.5.7",
"@types/cookie": "^0.5.1",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
@@ -1011,15 +1009,6 @@
}
}
},
- "node_modules/@tailwindcss/aspect-ratio": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.4.2.tgz",
- "integrity": "sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==",
- "dev": true,
- "peerDependencies": {
- "tailwindcss": ">=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1"
- }
- },
"node_modules/@tailwindcss/forms": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.3.tgz",
@@ -1032,21 +1021,6 @@
"tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1"
}
},
- "node_modules/@tailwindcss/typography": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.7.tgz",
- "integrity": "sha512-JTTSTrgZfp6Ki4svhPA4mkd9nmQ/j9EfE7SbHJ1cLtthKkpW2OxsFXzSmxbhYbEkfNIyAyhle5p4SYyKRbz/jg==",
- "dev": true,
- "dependencies": {
- "lodash.castarray": "^4.4.0",
- "lodash.isplainobject": "^4.0.6",
- "lodash.merge": "^4.6.2",
- "postcss-selector-parser": "6.0.10"
- },
- "peerDependencies": {
- "tailwindcss": ">=3.0.0 || insiders"
- }
- },
"node_modules/@tsconfig/node10": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
@@ -3871,18 +3845,6 @@
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
- "node_modules/lodash.castarray": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
- "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==",
- "dev": true
- },
- "node_modules/lodash.isplainobject": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
- "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
- "dev": true
- },
"node_modules/lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
@@ -7017,13 +6979,6 @@
"svelte-hmr": "^0.15.0"
}
},
- "@tailwindcss/aspect-ratio": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.4.2.tgz",
- "integrity": "sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==",
- "dev": true,
- "requires": {}
- },
"@tailwindcss/forms": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.3.tgz",
@@ -7033,18 +6988,6 @@
"mini-svg-data-uri": "^1.2.3"
}
},
- "@tailwindcss/typography": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.7.tgz",
- "integrity": "sha512-JTTSTrgZfp6Ki4svhPA4mkd9nmQ/j9EfE7SbHJ1cLtthKkpW2OxsFXzSmxbhYbEkfNIyAyhle5p4SYyKRbz/jg==",
- "dev": true,
- "requires": {
- "lodash.castarray": "^4.4.0",
- "lodash.isplainobject": "^4.0.6",
- "lodash.merge": "^4.6.2",
- "postcss-selector-parser": "6.0.10"
- }
- },
"@tsconfig/node10": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
@@ -9004,18 +8947,6 @@
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
- "lodash.castarray": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
- "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==",
- "dev": true
- },
- "lodash.isplainobject": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
- "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
- "dev": true
- },
"lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
diff --git a/package.json b/package.json
index 62d6860f..f86b6722 100644
--- a/package.json
+++ b/package.json
@@ -39,9 +39,7 @@
"@sveltejs/adapter-vercel": "next",
"@sveltejs/kit": "next",
"@sveltejs/package": "1.0.0-next.5",
- "@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.3",
- "@tailwindcss/typography": "^0.5.7",
"@types/cookie": "^0.5.1",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
diff --git a/src/lib/components/list/Title.svelte b/src/lib/components/list/Title.svelte
index fb73e0b2..133ca56c 100644
--- a/src/lib/components/list/Title.svelte
+++ b/src/lib/components/list/Title.svelte
@@ -1,10 +1,10 @@
-
+
-
+
diff --git a/src/lib/components/menu/Item.svelte b/src/lib/components/menu/Item.svelte
index 38e2fa52..9a360c50 100644
--- a/src/lib/components/menu/Item.svelte
+++ b/src/lib/components/menu/Item.svelte
@@ -35,10 +35,7 @@
}
-
+
diff --git a/src/lib/components/post/Created.svelte b/src/lib/components/post/Created.svelte
index 16ee9828..3fcb7a7d 100644
--- a/src/lib/components/post/Created.svelte
+++ b/src/lib/components/post/Created.svelte
@@ -9,8 +9,7 @@
component: 'Post.Header.Created'
});
- const defaultClass =
- 'prose max-w-full text-xs text-light-secondary-content dark:text-dark-secondary-content';
+ const defaultClass = 'text-xs text-light-secondary-content dark:text-dark-secondary-content';
const finalClass = twMerge(defaultClass, $$props.class);
diff --git a/src/lib/components/post/Creator.svelte b/src/lib/components/post/Creator.svelte
index 8b8cfa66..c4356e6c 100644
--- a/src/lib/components/post/Creator.svelte
+++ b/src/lib/components/post/Creator.svelte
@@ -1,6 +1,6 @@
diff --git a/src/lib/components/statistic/Statistic.svelte b/src/lib/components/statistic/Statistic.svelte
index 23a1d1d2..f5c13693 100644
--- a/src/lib/components/statistic/Statistic.svelte
+++ b/src/lib/components/statistic/Statistic.svelte
@@ -2,7 +2,7 @@
import { twMerge } from 'tailwind-merge';
const defaultClass =
- 'prose max-w-full overflow-hidden rounded-md px-4 py-5 shadow-md dark:shadow-black sm:p-5 bg-light-surface dark:bg-dark-surface';
+ 'overflow-hidden rounded-md px-4 py-5 shadow-md dark:shadow-black sm:p-5 bg-light-surface dark:bg-dark-surface';
const finalClass = twMerge(defaultClass, $$props.class);
diff --git a/src/lib/plugin/index.js b/src/lib/plugin/index.js
index 659ad393..886cf42a 100644
--- a/src/lib/plugin/index.js
+++ b/src/lib/plugin/index.js
@@ -435,6 +435,25 @@ module.exports = plugin(
}
});
addBase({
+ h1: {
+ 'font-weight': '800',
+ 'font-size': '2.25em',
+ 'line-height': '1.1111111'
+ },
+ h2: {
+ 'font-weight': '700',
+ 'font-size': '1.5em',
+ 'line-height': '1.3333333'
+ },
+ h3: {
+ 'font-weight': '600',
+ 'font-size': '1.25em',
+ 'line-height': '1.6'
+ },
+ h4: {
+ 'font-weight': '600',
+ 'line-height': '1.5'
+ },
"[type='text']:focus": {
outline: 'unset',
'outline-offset': 'unset',
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index c2ecb3e7..f3a3df51 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -99,10 +99,10 @@
-
Components you want
-
+
+
diff --git a/src/routes/alert/+page.svelte b/src/routes/alert/+page.svelte
index 4995be50..78bd0586 100644
--- a/src/routes/alert/+page.svelte
+++ b/src/routes/alert/+page.svelte
@@ -21,7 +21,7 @@
- Title
+ Title
I am a description