0

I am working on a CSS documentation with VuePress, and don't manage to import a .css file into a component. The website is quite old and there are still differences between desktop, smartphone... so I need to be able to import a precise .css file into a Vue component.

I did this:

<style lang="scss" scoped>

@import url('...');

</style>

But it doesn't work. Importing it into the config.js will not allow me to change .css files, and I need to to be able to choose depending upon the component.

Does anyone have an idea? Thanks.

2
  • 1
    Does this answer your question? How to load external CSS in Vue Commented Oct 16, 2020 at 12:37
  • @MichalLevý Thanks, two mistakes in my code, first the wrong link... and second, url() not needed. Commented Oct 16, 2020 at 12:51

1 Answer 1

0

I had 2 errors.

First the wrong link... sorry to not have seen it earlier.

Second, @import '...' is enough, no need of url('').

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.