Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

images from built-in styles do not appear #1974

Closed
yurifyodorov opened this issue Sep 1, 2018 · 1 comment
Closed

images from built-in styles do not appear #1974

yurifyodorov opened this issue Sep 1, 2018 · 1 comment

Comments

@yurifyodorov
Copy link

❔ Question

Perhaps this issue will be immediately closed, as it probably duplicates #1456. But after reading the entire branch, I didn't understand how to enable inline style handling.

Parcel is an excellent packer, but it is not so easy to start using it for a beginner...

🔦 Context

The problem is as follows:
2018-09-01_17-36-48

I want to attach a background image for the site header inside the <style>tag.
I've seen the message @devongovett , about that built-in styles are not analyzed.
massage

How can I connect a background image inside index.html?
I know I can connect it to an external style.css, but I want to specify all styles of the first screen in index.html. external styles at me are connected through rel= "preload" and are applied after page rendering.

💻 Code Sample

Configuration (package.json)

  "scripts": {
    "start": "parcel src/index.html --open",
    "build": "parcel build src/index.html"
  }

HTML

<html>
  <head>
     <style>
        .header {
                background: url('../img/bg1920.jpg');
              }
     </style>
  </head>
  <body>
     <header class="header"></header>
</html>

🌍 Your Environment

Software Version(s)
Parcel 1.9.7
Node 8.11.4
Yarn v1.9.4
Operating System Win10
@DeMoorJasper
Copy link
Member

This will be supported in the next release. See #1456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants