After setting up Tailwind, the previously deleted styles from both Vite and the CSS file continue to be applied

After following the instructions in the Tailwind documentation, I successfully installed tailwind and other necessary tools using

npm install -D tailwindcss postcss autoprefixer vite
.

I then proceeded to configure my tailwind.config.js file as shown below:

export default {
  content: [
    "./index.html",
    "./src/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [require("daisyui")],
}

In addition, I added the Tailwind directives to my index.css file:

@tailwind base;
@tailwind components;
@tailwind utilities;

Although Tailwind was working fine, some previous styles from Vite were still being applied. For example, you can see the dark background in this image: [1](https://i.sstatic.net/gvzpM.png).

Despite deleting all relevant files, these old styles persisted. It seems that the dark background from the vite example count is somehow still being applied.

Answer №1

Although a definitive solution was not found, it appears that the issue lies in the theme being applied to the root element. In the developer tools, it shows :root, [data-theme]. To address this, I switched the theme to light mode by editing the HTML tag in index.html to be

<html lang="en" data-theme="light">
.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Encountering a z-index problem while viewing videos in 768 resolution on Safari and IE8

Currently, I am encountering a z-index problem with videos in IE8 and Safari browsers. Click here to visit the link Even after reducing the z-index, the video on this page appears on top at 760 resolution. It does not seem to respond to any properties. F ...

Stopping autoplay in Swiper JS in React when the mouse enters and starting it again when the mouse leaves - a guide

I am currently exploring swiper.js in react by creating a basic image slider with autoplay feature, but I'm unsure how to pause autoplay when the mouse enters and resume it when it leaves. I attempted using onMouseLeave={Swiper.autoplay.stop}, however ...

Meteor application: The correct method for fetching a single document from a collection on the client side

Currently in my meteor app, I am saving the unique id of the client within a collection named UserNavigationTracker: { "clientId" : "xxNfxxPGi7tqTbxc4", "currentWizard" : "IntroductionWizard", "currentStep" : "Step-1", "_id" : "ifBJ688upEM ...

Ways to extract the data from a redux action

I am using redux-thunk to call an API and I'm trying to access the results from the action data When I check the console after dispatching fetchTrending() in the component, I see that a promise is returned. Can anyone guide me on how to retrieve the ...

Navigating with React router and backend handling with express

Currently, I am delving into the world of MERN stack for my web development projects. However, I've hit a roadblock in figuring out how to effectively handle both client-side rendering and server-side rendering. For instance, I have a URL like: http: ...

Extract data from Twitter JSON using jQuery, but do not parse the same data in my PHP document

I have created a function that parses Twitter search results and incorporates them into my HTML document. The code is functioning properly! Below is the code snippet. <script> $(function update_twit(){ $("#notice_div").html('Updating..') ...

step-by-step guide on showcasing and concealing textbox borders

Within a table, I have a column with a text box for users to edit the text as needed. The edited text is properly being saved using the onkeyup event. However, I want to hide the border of the text box after editing, so only the edited text is visible. If ...

Iterating through a set of HTML elements and making updates using a forEach loop

I have encountered an issue while attempting to update a group of HTML elements within a forEach loop. Initially, everything appears to be functioning correctly up to section 3. However, upon adding a new section, the problem arises where the navigation ba ...

Why is my jQuery $.ajax success function not providing any results?

When checking the Network tab in Chrome, I noticed that the correct data (action, username, password) is being sent, but the message is not returning to $('#return_login'). Can anyone spot what might be wrong with my code? Below is the jQuery co ...

Searching for the object that occurs an uneven number of times

Currently, I am tackling a challenge on Codewars that requires identifying the element in an array that occurs an odd number of times. The current solution I have successfully passes 3 out of 6 tests. function findOdd(A) { //happy coding! let odd = &qu ...

Error encountered in collision detection on the server side with three.js

Is there a reason why collision detection with three.js behaves differently on the server side compared to the client side, even though they both use the same scene setup? Our goal is to determine collisions with the world on the server side, using a simp ...

Trouble with the div element's change event

Hey there! I'm having trouble with this jQuery code that is supposed to fade in or fade out a div based on its contents. Here is the HTML code: <div class="mainContentWrapper"> sample text </div> And here is the CSS code: div.main ...

Can you explain the process of obtaining getServerSideProps results for my IndexPage?

Having trouble with the getServerSideProps function. I'm a beginner and struggling to figure out why it's not running properly. Spent hours trying to fix it, but still getting undefined in the IndexPage console.log(props.data) export default fun ...

Access the data from a JSON object within a v-select menu

<v-form :model='management'> <v-flex xs3 sm2 md3> <div class="form-group> <v-select :items="days" item-text='text' item-value='text' placeholder="MM" single-line attach v- ...

How can you modify the color of a <canvas> element using CSS?

Can the HTML5 element's color be modified using CSS as opposed to JS? I am looking to personalize qTips tooltip pointers with specific LESS CSS instructions that cannot be referenced through jQuery. ...

Creating a file structure for JavaScript files in a Vue CLI project

When structuring my Vue CLI project, I'm struggling to find clear documentation on best practices. Currently, I have 10 modules each with an associated JS file. My approach so far involves organizing all the pages in my router.js within a views direc ...

What is the best way to remove the extra space around a Material UI checkbox?

https://i.sstatic.net/PbWJf.png The issue at hand is clear. Even when the user clicks outside of the checkbox, it will still alter the box value. The objective is to eliminate that gap. <FormControlLabel style={{ height: &quo ...

Tips for integrating AudioWorklets with vue-cli, webpack, and babel (resolved illegal invocation error)

I'm experiencing some challenges while attempting to develop a WebApp using vue-cli with AudioWorklets. Whenever I try to access properties of my AudioWorkletNode, such as port or channelCount, I encounter multiple errors: TypeError: Illegal invocati ...

JEST does not include support for document.addEventListener

I have incorporated JEST into my testing process for my script. However, I have noticed that the coverage status does not include instance.init(). const instance = new RecommendCards(); document.addEventListener('DOMContentLoaded', () => ...

Is there a way to incorporate both max-width and min-width in a matchMedia query effectively?

I'm currently utilizing the matchMedia API in my JavaScript code to identify viewports, with the goal of reducing DOM manipulations. Instead of using display: none extensively, I am opting for a v-if directive from Vue to determine when elements are ...