Skip to content

Commit df96f99

Browse files
authored
don't use tailwind directives in mantle.css (#112)
* remove tailwind from mantle.css * do not use tailwind directives in mantle.css
1 parent 0401a89 commit df96f99

File tree

5 files changed

+642
-587
lines changed

5 files changed

+642
-587
lines changed

.storybook/preview.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { withThemeByClassName } from "@storybook/addon-styling";
22
import type { Preview } from "@storybook/react";
33
import { theme } from "../components/theme-provider";
44
import "../assets/mantle.css";
5+
import "tailwindcss/tailwind.css";
56

67
const preview: Preview = {
78
parameters: {

app/root.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ import { PreventWrongThemeFlash, ThemeProvider } from "@/theme-provider";
22
import { cssBundleHref } from "@remix-run/css-bundle";
33
import type { LinksFunction } from "@remix-run/node";
44
import { Links, LiveReload, Meta, Outlet, Scripts, ScrollRestoration } from "@remix-run/react";
5+
import tailwind from "tailwindcss/tailwind.css";
56
import mantleCss from "../assets/mantle.css";
67
import { Layout } from "./components/layout";
78

89
export const links: LinksFunction = () => [
910
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
1011
{ rel: "stylesheet", href: mantleCss },
12+
{ rel: "stylesheet", href: tailwind },
1113
];
1214

1315
export default function App() {

assets/mantle.css

+14-38
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
@import url("https://cdn.ngrok.com/static/fonts/fonts.css");
22

3-
@tailwind base;
4-
@tailwind components;
5-
@tailwind utilities;
6-
73
:root {
84
/* ngrok custom blue (600 is current button)
95
* These are required as they are referenced by both light and dark modes.
@@ -1095,35 +1091,17 @@
10951091
--button: var(--white);
10961092
}
10971093

1098-
@layer base {
1099-
/**
1100-
* provide an a11y escape hatch for those that prefer less motion
1101-
*/
1102-
@media (prefers-reduced-motion: reduce) {
1103-
*,
1104-
*::before,
1105-
*::after {
1106-
animation-duration: 0.01ms !important;
1107-
animation-iteration-count: 1 !important;
1108-
transition-duration: 0.01ms !important;
1109-
scroll-behavior: auto !important;
1110-
}
1111-
}
1094+
.light {
1095+
color-scheme: light;
11121096
}
1113-
1114-
@layer utilities {
1115-
.light {
1116-
color-scheme: light;
1117-
}
1118-
.dark {
1119-
color-scheme: dark;
1120-
}
1121-
.light-high-contrast {
1122-
color-scheme: light;
1123-
}
1124-
.dark-high-contrast {
1125-
color-scheme: dark;
1126-
}
1097+
.dark {
1098+
color-scheme: dark;
1099+
}
1100+
.light-high-contrast {
1101+
color-scheme: light;
1102+
}
1103+
.dark-high-contrast {
1104+
color-scheme: dark;
11271105
}
11281106

11291107
/**
@@ -1192,12 +1170,6 @@
11921170
font-style: italic;
11931171
}
11941172

1195-
@layer base {
1196-
body {
1197-
@apply bg-white text-gray-900;
1198-
}
1199-
}
1200-
12011173
.scrollbar::-webkit-scrollbar {
12021174
width: 0.5rem;
12031175
height: 0.5rem;
@@ -1223,3 +1195,7 @@
12231195
scrollbar-color: hsl(var(--gray-600) / 0.5) transparent;
12241196
scrollbar-width: thin;
12251197
}
1198+
1199+
body {
1200+
@apply bg-white text-gray-900;
1201+
}

package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "mantle is ngrok's UI library and design system.",
44
"author": "ngrok",
55
"license": "MIT",
6-
"version": "0.0.5",
6+
"version": "0.0.6",
77
"homepage": "https://mantle.ngrok.com",
88
"repository": {
99
"type": "git",
@@ -70,25 +70,25 @@
7070
"@parcel/transformer-typescript-types": "2.11.0",
7171
"@remix-run/dev": "2.5.1",
7272
"@remix-run/eslint-config": "2.5.1",
73-
"@storybook/addon-essentials": "7.6.11",
74-
"@storybook/addon-interactions": "7.6.11",
75-
"@storybook/addon-links": "7.6.11",
73+
"@storybook/addon-essentials": "7.6.12",
74+
"@storybook/addon-interactions": "7.6.12",
75+
"@storybook/addon-links": "7.6.12",
7676
"@storybook/addon-onboarding": "1.0.11",
7777
"@storybook/addon-styling": "1.3.7",
78-
"@storybook/blocks": "7.6.11",
79-
"@storybook/builder-vite": "7.6.11",
80-
"@storybook/react": "7.6.11",
81-
"@storybook/react-vite": "7.6.11",
78+
"@storybook/blocks": "7.6.12",
79+
"@storybook/builder-vite": "7.6.12",
80+
"@storybook/react": "7.6.12",
81+
"@storybook/react-vite": "7.6.12",
8282
"@storybook/testing-library": "0.2.2",
83-
"@testing-library/react": "14.1.2",
83+
"@testing-library/react": "14.2.0",
8484
"@testing-library/user-event": "14.5.2",
85-
"@types/node": "20.11.10",
85+
"@types/node": "20.11.16",
8686
"@types/prismjs": "1.26.3",
87-
"@types/react": "18.2.48",
87+
"@types/react": "18.2.51",
8888
"@types/react-dom": "18.2.18",
8989
"@typescript-eslint/eslint-plugin": "6.20.0",
9090
"@typescript-eslint/parser": "6.20.0",
91-
"@vitejs/plugin-react-swc": "3.5.0",
91+
"@vitejs/plugin-react-swc": "3.6.0",
9292
"@vitest/ui": "1.2.2",
9393
"autoprefixer": "10.4.17",
9494
"browserslist": "4.22.3",
@@ -107,7 +107,7 @@
107107
"prettier-plugin-tailwindcss": "0.5.11",
108108
"react": "18.2.0",
109109
"react-dom": "18.2.0",
110-
"storybook": "7.6.11",
110+
"storybook": "7.6.12",
111111
"tailwindcss": "3.4.1",
112112
"tailwindcss-animate": "1.0.7",
113113
"tsx": "4.7.0",

0 commit comments

Comments
 (0)