Media query not detected when running from Visual Studio Code

Hello,

I just finished the Technical Documentation Page project, but there seems to be an issue in my environment.

This is the Pen: https://codepen.io/corimeier/pen/yLzxKMK
Running tests, I get 16 of 16 passed. :slight_smile:

When I run the exact same code (copy & paste) from my Visual Studio Code application, I get the error pasted below.

Is there something additional I have to do to make it work from Visual Studio Code?

Thank you,
Corina. :slight_smile:

2. My Technical Documentation page should use at least one media query.
No media queries detected : expected false to be true
AssertionError: No media queries detected : expected false to be true
    at o.<anonymous> (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:549:14996)
    at o.e (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:425:182)
    at Reflect.get (<anonymous>)
    at Object.e [as get] (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:92:1382)
    at Function.a.isTrue (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:574:1222)
    at a.<anonymous> (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:608:132694)
    at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:593:259477
    at ay.xg.run (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:593:259772)
    at r.Qg.runTest (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:593:274680)
    at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:593:275616

Hello,

it might be just wrong link to the css file.
<link rel="stylesheet" href="styles.css"> this is the link form your pen, so do you have your css file in the same folder as the hmtl file and do you use the same name? Or are you using the style tag in the html instead?
Feel free to share the part of the hml file which adds the css to the project when you are running it in the VS code (and also the folder structure) so we can help you better.

When running the tests locally you have to serve the page and not just open it in the browser otherwise the two tests (flex and media query) will fail.
You can use any local dev server you like or a VS Code extension (e.g. Five server).

Hi. Thanks for replying. The css file is in the same folder.

Hi Roma, I appreciate the reply. I guess in that sense I will leave it for now. Thank you very much.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.