-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
407ca83
commit ca76859
Showing
20 changed files
with
840 additions
and
129 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import "./globals.css"; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: Readonly<{ | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
const inSpatialTailwindConfig = require("@inspatial/tailwind-config"); | ||
|
||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: [], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
} | ||
|
||
presets: [inSpatialTailwindConfig], | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ | |
"**/*.ts", | ||
"**/*.tsx", | ||
".next/types/**/*.ts" | ||
], | ||
, "tailwind.config.js" ], | ||
"exclude": ["node_modules"] | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
{ | ||
"name": "@inspatial/tailwind-config", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Tailwind CSS configuration for Inspatial Apps", | ||
"main": "tailwind.config.ts", | ||
"main": "src/index.ts", | ||
"files": [ | ||
"tailwind.config.ts" | ||
"src/**/*" | ||
], | ||
"peerDependencies": { | ||
"tailwindcss": "^3.4.13 || ^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.16.10" | ||
"@types/node": "^20.16.11", | ||
"@types/tailwindcss": "^3.1.0", | ||
"tailwindcss": "^3.4.13", | ||
"typescript": "^5.0.0" | ||
}, | ||
"dependencies": { | ||
"@tailwindcss/aspect-ratio": "^0.4.2", | ||
"@tailwindcss/forms": "^0.5.9", | ||
"@xpd/tailwind-3dtransforms": "^1.0.3", | ||
"mini-svg-data-uri": "^1.4.4", | ||
"tailwind-merge": "^2.5.3", | ||
"tailwind-scrollbar": "^3.1.0", | ||
"tailwind-variants": "^0.2.1" | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
packages/config/tailwind-config/plugins/add-grid-backgrounds.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import svgToDataUri from 'mini-svg-data-uri'; | ||
import flattenColorPalette from 'tailwindcss/lib/util/flattenColorPalette'; | ||
import plugin from 'tailwindcss/plugin'; | ||
|
||
/** | ||
* This function creates a grid pattern for backgrounds using SVGs. | ||
*/ | ||
export const addGridBackgrounds = plugin(({ matchUtilities, theme }) => { | ||
matchUtilities( | ||
{ | ||
"bg-grid": (value) => ({ | ||
backgroundImage: `url("${svgToDataUri( | ||
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="${value}"><path d="M0 .5H31.5V32"/></svg>` | ||
)}")`, | ||
}), | ||
"bg-dot": (value) => ({ | ||
backgroundImage: `url("${svgToDataUri( | ||
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16" fill="none"><circle fill="${value}" id="pattern-circle" cx="10" cy="10" r="1.6257413380501518"></circle></svg>` | ||
)}")`, | ||
}), | ||
}, | ||
{ values: flattenColorPalette(theme("backgroundColor")), type: "color" } | ||
); | ||
}); |
Oops, something went wrong.