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.

Some styles are missing after css is compiled, and it is normal for development.

See original GitHub issue

Environment


  • Operating System: Windows_NT
  • Node Version: v16.13.0
  • Nuxt Version: 3.0.0-rc.8
  • Package Manager: npm@8.1.0
  • Builder: vite
  • User Config: modules, experimental, unocss, colorMode, hooks
  • Runtime Modules: @vueuse/nuxt@9.1.0, @unocss/nuxt@0.45.7, @pinia/nuxt@0.4.0, @nuxtjs/color-mode@3.1.4
  • Build Modules: -

Reproduction

https://github.com/amihhs/github-xtzryz

  1. pnpm i
  2. pnpm build
  3. pnpm start

file: /layouts/default.vue

Describe the bug

I use unocss

.default-header{
  @apply fixed w-full top-0 z-999 shadow-lg backdrop-blur-md;
  @apply bg-white bg-opacity-60 dark:bg-dark-800;
  @apply h-15 sm:h-20;
}

It has some less styles at compile time.

  • Normal(dev) image

  • Error(build) image

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
amihhscommented, Aug 18, 2022

In the course of testing, I found that if there is a normal css in class, it will work properly. example:

.ISSUE {
   postions:fixed;
  @apply fixed w-full top-0 z-999 shadow-lg backdrop-blur-md bg-white bg-opacity-60 dark:bg-dark-800 h-15 sm:h-20;
}

It should not have much to do with nuxt. It may be the problem with vite3. Before, vite2 was able to work normally.

1reaction
516310460commented, Aug 18, 2022

You can use tailwindcss or a custom css to see if it is related to nuxt. I don’t think it is related to nuxt

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS changes are not getting reflected. Why? - Stack Overflow
This means that your CSS rule is not applied or that your CSS file is cached. The possible causes are: a CSS rule...
Read more >
Solving the React Error: Not Picking Up CSS Style | Pluralsight
In this guide, you will learn about the errors that can occur while importing a CSS file into your React file.
Read more >
Debugging CSS - Learn web development | MDN
Select an element on your page, either by right/ctrl-clicking on it and selecting Inspect, or selecting it from the HTML tree on the...
Read more >
How to Fix the Error: "The package could not be installed. The ...
A missing style.css file means one of two things: the theme developer (potentially you) failed to include it in the root directory, or...
Read more >
Documentation | U.S. Web Design System (USWDS)
If you make customizations to the files in the package, any upgrade or ... Stylesheet: This is the compiled CSS stylesheet that describes...
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