DioxusLabs / DioxusLabs/dioxus
Valid SCSS fails to build
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
**Problem**
The assets pipeline does not build when using CSS functions that clash with SCSS ones, such as [round](https://developer.mozilla.org/en-US/docs/Web/CSS/round).
I get the following error:
```
16:45:13 [dev] Build failed: Other(Failed to write assets
Caused by:
Error: Only 1 argument allowed, but 2 were passed.
╷
4 │ width: round(up, 10px);
│ ^^^^^^^^^^^^^^^
╵
```
I suspect it happens because it clashes with the `round` function from [sass:math](https://sass-lang.com/documentation/modules/math/#round), but I would have expected native CSS functions to take precedence, especially since `sass:math` is not even imported by this file.
**Steps To Reproduce**
Steps to reproduce the behavior:
- create a new Dioxus web project
- add the following SCSS file
```scss
# assets/hello.scss
.hello {
width: round(up, 10px);
}
```
- import it
```rust
const HELLO: Asset = asset!("/assets/hello.scss");
```
- run `dx serve`
**Expected behavior**
The application builds correctly.
**Environment:**
- Dioxus version: 0.6.3
- Rust version: 1.86.0
- OS info: Ubuntu 22.04.5 LTS
- App platform: web
**Questionnaire**
I'm interested in fixing this myself but don't know where to start.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.