No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    predictable order of CSS

    Framework
    4
    4
    1122
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      javierabadia last edited by

      Hi,

      In ‘dev’ mode, my component styles always come after the quasar styles. They take precedence.
      However in ‘build’ mode, quasar styles are compiled after the style in my components.

      This causes problems in code like this:

      <div class=“card my-card-style”>
      …
      </div>

      .my-card-style {
      margin-bottom: 50px;
      }

      because in ‘build’ mode this custom style is included before quasar styles and therefore overriden by .card styles

      Alternatively, how can I modify the config of webpack to put quasar css styles in it’s own separate bundle?

      Thanks!

      1 Reply Last reply Reply Quote 1
      • S
        spectrolite last edited by

        I thought that would be a problem only if you’re overriding existing quasar classes. In your example you are not (my-card-style is not in quasar).
        Are you really encountering this problem with this example, or are you over-simplifying your issue for the forum ?

        1 Reply Last reply Reply Quote 0
        • H
          hctpbl last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • rstoenescu
            rstoenescu Admin last edited by

            @javierabadia Please take a look at a barebones starter kit’s src/main.js. Notice the difference between require and import. Your problem should not exist if you use require for Quasar’s CSS.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post