egoist / egoist/rollup-plugin-postcss

Error when importing a third party .scss file as a global with Error "Missing whitespace before :global"

Open
#430 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
689
Forks
210
PR merge metrics
No merged PRs in 30d

Description

Our custom component wraps a third party Carousel. We'd like to incorporate the third party css into the module but need to mark it as global.

I have used the following in the .scss file

```
:global {
@import 'node_modules/swiper/swiper.scss';
@import 'node_modules/swiper/modules/pagination/pagination.scss';
}
```

this is the correct syntax, but it errors with "Missing whitespace before :global "

![image](https://user-images.githubusercontent.com/907610/192096803-1197b14c-320c-4972-95a8-c744e85820f7.png)

Any thoughts on how to fix this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.