-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested :global
selectors
#11702
Comments
Is your VSCode extension up to date, and do you have the latest |
vscode is up-to-date according to the marketplace...
svelte version is 5.0.0-next.136... npx envinfo --system --npmPackages svelte,rollup,webpack --binaries --browsers
System:
OS: macOS 14.4.1
CPU: (8) arm64 Apple M1
Memory: 84.22 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.0 - ~/.nvm/versions/node/v20.12.0/bin/node
npm: 10.5.0 - ~/.nvm/versions/node/v20.12.0/bin/npm
pnpm: 9.1.1 - ~/Library/pnpm/pnpm
bun: 1.0.29 - ~/.bun/bin/bun
Browsers:
Chrome: 124.0.6367.209
Edge: 125.0.2535.51
Safari: 17.4.1
npmPackages:
svelte: 5.0.0-next.136 => 5.0.0-next.136 I'm thinking it's something with my tailwind / postcss setup. // postcss.config.js
export default {
plugins: {
'postcss-import': {},
'tailwindcss/nesting': {},
tailwindcss: {},
'postcss-preset-env': {
browsers: ['last 2 versions', 'not dead', 'not op_mini all']
}
}
}; // talwind.config.ts
import { addDynamicIconSelectors } from '@iconify/tailwind';
import colors from 'tailwindcss/colors';
/** @type {import('tailwindcss').Config} */
const config = {
darkMode: ['class'],
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {
colors: {
gs: colors.neutral,
primary: colors.blue,
danger: colors.red
}
}
},
plugins: [addDynamicIconSelectors()]
};
export default config; |
Here's a repro with
repro: https://github.com/cdcarson/svelte-styles-repro the example components are here: https://github.com/cdcarson/svelte-styles-repro/tree/main/src/lib |
This currently work in my project:
Note: I have postcss and tailwind setup. I have a project that has "SidebarItem" component that uses a "Link" component and I had to pass a custom class "active" to highlight it when it's active. I had to use global to get it done but it works:
|
@jamesst20 See the error I posted above...
Your examples work because the |
This works now |
Describe the problem
You can do this:
It would be nice if you could do this:
Right now it fails cryptically.
Describe the proposed solution
see above
Importance
nice to have
The text was updated successfully, but these errors were encountered: