Skip to content

Commit

Permalink
Merge pull request #102 from fabien-ml/develop
Browse files Browse the repository at this point in the history
fix: #101
  • Loading branch information
fabien-ml authored Feb 1, 2023
2 parents 17db58a + 72b390e commit c331859
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-lamps-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kobalte/tailwindcss": patch
---

fix: #101
4 changes: 4 additions & 0 deletions apps/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"solid-js": "^1.6.1"
},
"devDependencies": {
"@kobalte/tailwindcss": "^0.4.0",
"autoprefixer": "10.4.13",
"postcss": "8.4.19",
"tailwindcss": "3.2.4",
"typescript": "^4.7.4",
"vite": "^3.0.3",
"vite-plugin-solid": "^2.3.0"
Expand Down
6 changes: 6 additions & 0 deletions apps/playground/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
10 changes: 3 additions & 7 deletions apps/playground/src/index.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
"Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@tailwind base;
@tailwind components;
@tailwind utilities;
8 changes: 8 additions & 0 deletions apps/playground/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{html,js,jsx,ts,tsx}"],
theme: {
extend: {},
},
plugins: [require("@kobalte/tailwindcss")],
};
8 changes: 4 additions & 4 deletions packages/tailwindcss/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ module.exports = plugin.withOptions(({ prefix = "ui" } = {}) => {
for (let state of STATES) {
addVariant(`${prefix}-${state}`, [`&[data-${state}]`]);
addVariant(`${prefix}-not-${state}`, [`&:not([data-${state}])`]);
addVariant(`${prefix}-group-${state}`, `:merge(.group):[data-${state}] &`);
addVariant(`${prefix}-peer-${state}`, `:merge(.peer):[data-${state}] ~ &`);
addVariant(`${prefix}-group-${state}`, `:merge(.group)[data-${state}] &`);
addVariant(`${prefix}-peer-${state}`, `:merge(.peer)[data-${state}] ~ &`);
}

for (let orientation of ORIENTATIONS) {
addVariant(`${prefix}-${orientation}`, [`&[data-orientation='${orientation}']`]);
addVariant(`${prefix}-not-${orientation}`, [`&:not([data-orientation='${orientation}'])`]);
addVariant(
`${prefix}-group-${orientation}`,
`:merge(.group):[data-orientation='${orientation}'] &`
`:merge(.group)[data-orientation='${orientation}'] &`
);
addVariant(
`${prefix}-peer-${orientation}`,
`:merge(.peer):[data-orientation='${orientation}'] ~ &`
`:merge(.peer)[data-orientation='${orientation}'] ~ &`
);
}
};
Expand Down
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c331859

Please sign in to comment.