### Bug description

I'm running quarto 1.2.269 on Windows, using sass files to customize HTML output. It seems that custom theme files for light mode are unexpectedly applied to dark mode.

For example, consider this qmd file:

```md
---
title: Test
format:
  html:
    theme:
      light: [flatly, "custom.scss"]
      dark: [darkly]
---
```

and in `custom.scss`:

```scss
/*-- scss:rules --*/
body::after{
    content: "foo";
}
```

I expected to get "foo" in light mode only. However, after rendering, "foo" can be seen in both light and dark mode.

I guess this might have something to do with `bootstrap.min.css` and `bootstrap-dark.min.css` included in `<head>`, since both of them are applied in dark mode.

Apologize if I've missed something obvious. Thanks!

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
2022-12-19T12:56:39Z
sun123zxy
bug
Future
open
Custom theme sass file for light mode unexpectedly applied to dark mode
https://github.com/quarto-dev/quarto-cli/issues/3705