DioxusLabs / DioxusLabs/dioxus
Sass is incorrectly compiled
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
**Problem**
When using a SCSS file which uses the Sass version of Bulma (version 1.0.0) as an asset, several styling issues occur. For example:
- Buttons lack rounded corners (see screenshot below).
- Modal overlays do not have a dark background and do not cover the full screen.
- Several elements have wrong margins and padding.
When the same SCSS is compiled using Dart Sass, the resulting CSS renders correctly without these issues.
**Steps To Reproduce**
The reproducer is based on the PWA example (tag v0.6.3). Only added and changed files are shown:
`public/main.scss`:
```sass
@use "path/to/bulma/sass"
```
`src/main.rs`:
```rust
use dioxus::prelude::*;
fn main() {
dioxus::launch(app);
}
const MAIN_CSS: Asset = asset!("/public/main.scss");
fn app() -> Element {
rsx! (
document::Link { rel: "stylesheet", href: MAIN_CSS }
div {
class: "container py-4",
div {
class: "field has-addons",
p {
class: "control",
button { class: "button is-primary", "A" }
}
p {
class: "control",
button { class: "button", "B" }
}
}
}
)
}
```
The page served by `dx serve` looks as follows:

**Expected behavior**
The page served by `dx serve` looks as follows:

This is the case if the SCSS file is compiled with Dart Sass:
```console
$ sass public/main.scss public/main.css
```
And the `MAIN_CSS` asset is replaced by `asset!("/public/main.css")`.
**Environment:**
- Dioxus version: 0.6.3
- Rust version: 1.85.0
- OS info: Arch Linux
- App platform: web
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.