### Bug description

When rendering to HTML, If I include a CSS file using `css: path/to/mycustom.css` in the header YAML, if this CSS file is referenced using a absolute path, it will not be found when running `quarto preview`.

I'm not sure if this is intended or not, but it means that the previewed version in the browser will not look the same as the rendered html (since the rendered html file can of course reference CSS files outside the local directory like `<link rel="stylesheet" href="/absolute/path/to/mycustom.css" />`).  This matters if the CSS file is not inside the directory where the .(q)md file is.

At first I thought perhaps this is intentional, because the quarto preview function is meant to not reference external css files?  However perhaps not, because it does let you reference external template files just fine with `template: /absolute/path/to/template`.

---

As a concrete mwe, suppose you have a file in some local location like `/Users/Shared/mycustom.css`, with some defines some CSS:

```css
body {
  color: white;
  background-color: black;
}
```

And suppose you have a quarto file `/Users/Shared/mytest/test.qmd`
```qmd
---
title: Title
theme: none
css: /Users/Shared/mycustom.css
---

Example body text here.
```

If you run `quarto preview /Users/Shared/mytest/test.qmd`, the output will say `/Users/Shared/mycustom.css (404: Not Found)` you'll get a preview that doesn't use the referenced CSS, even though the output HTML file is fine, and contains `<link rel="stylesheet" href=" /Users/Shared/mycustom.css" />` in the header, so it will look fine if opened in a browser, rather than through previewing.

_version info: Quarto v0.9 Build 629, macOS v12.3.1 (21E258)_

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included a minimal, self-contained, and reproducible example?
- [X] documented the quarto version you're running, by providing the output produced by `quarto check` in a terminal in your issue?
- [X] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
2022-06-29T17:55:24Z
postylem
bug
closed
CSS with full path not found during `preview`
https://github.com/quarto-dev/quarto-cli/issues/1251