question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with stylus block level import

See original GitHub issue

Because Vuetify is using some generic classes like btn or title is it very hard to use it in an existing environment. However, stylus has the option to block-level imports, that could be very handy to isolate classes into the vue App scope to not collide with existing ones.

Import vuetify/src/stylus/app into a css selector doesn’t work as expected

Steps to reproduce

compile with webpack

Versions

0.15 à la carte

What is expected ?

To compile the whole css into a parent selector

What is actually happening ?

without block-level import it works as expected.

<style lang="stylus">
    @require '~../node_modules/vuetify/src/stylus/app'
</style>

with block-level, got a compilation error

<style lang="stylus">
    #app
      @require '~../node_modules/vuetify/src/stylus/app'
</style>

` ERROR Failed to compile with 1 errors 16:14:33

error in ./src/App.vue

Module build failed: Error: /Users/xxxx/Workspace/webpack/src/App.vue:18:11 14| 15| #app 16| @require ‘~…/node_modules/vuetify/src/stylus/app’ 17|

Failed to @extend “code”

at /Users/xxxx/Workspace/webpack/node_modules/stylus/lib/visitor/normalizer.js:406:17
at Array.forEach (<anonymous>)
at Normalizer.extend (/Users/xxxx/Workspace/webpack/node_modules/stylus/lib/visitor/normalizer.js:402:17)
...`

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
lkmadushancommented, Jun 21, 2018

I’m getting following error for the latest version of Vuetify. screen shot 2018-06-21 at 2 32 40 pm

@Zeph33 @johnleider Any idea for how to fix that?

0reactions
johnleidercommented, Jun 21, 2018

@lkmadushan Please do not comment on closed issues. If you have a bug, please create a new issue, https://issues.vuetifyjs.com or seek help in our community, https://community.vuetifyjs.com

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stylus:block-level @import and @require cause "unexpected ...
Stylus:block-level @import and @require cause "unexpected element CSS_RBRACE" when using braces ; Project, WebStorm ; Type, Bug ; Available in, 2017.3 ; State ......
Read more >
How to use stylus block level import with Vuetify styles
Found a way to deal with it. Actually I just specified the full relative path to the style file .vuetify-styles { @import (less)...
Read more >
import and @require - Stylus Lang
Stylus supports block-level import. It means that you can use @import not only at root level, but also nested inside other selectors or...
Read more >
Top 5 stylus Code Examples - Snyk
Learn more about how to use stylus, based on stylus code examples created from the most popular ways it is used in public...
Read more >
Known issues in Premiere Pro - Adobe Support
Issue with imported AAF files with multitrack audio on Apple silicon. Result: While on Apple silicon, importing an AAF file with multi-channel ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found