Skip to content

CSS compilation error #26

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

Closed
badunius opened this issue Jan 23, 2020 · 1 comment
Closed

CSS compilation error #26

badunius opened this issue Jan 23, 2020 · 1 comment

Comments

@badunius
Copy link

Bug

<style>
#view {
  grid-area: view;
  display: flex;
  flex-flow: column nowrap;
}

#view :first-child {
  margin-top: 0;
}
</style>

Produces a warning and doesn't compile the second rule

WARNING in ./src/comp/View.svelte
Module Warning (from ./node_modules/svelte-loader/index.js):
Unused CSS selector (48:0)
46: }
47: 
48: #view :first-child {
    ^
49:   margin-top: 0;
50: }
 @ ./src/App.svelte 25:0-37 51:18-22
 @ ./src/main.js
 @ multi ./src/main.js

Replacing " " with ">" (which is even better) solves the warning but leads to the wrong CSS output

#view.svelte-16764tj {
 grid-area:view;
 display:flex;
 flex-flow:column nowrap
}
#view>.svelte-16764tj:first-child {
 margin-top:0
}

.svelte-16764tj is supposed to go before ">" not after

@ahsath
Copy link

ahsath commented Jan 31, 2020

I think there is a space between #viex :first-childit should be #viex:first-child

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants