Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
94 views

I’m working on a React app for my college project (using React + Vite) and I recently tried changing my theme colors defined in :root. However, the new values are not reflected across my site — only ...
CodeMaven42's user avatar
2 votes
1 answer
208 views

I'm currently developing with React Vite Tailwind "tailwindcss": "^4.1.4" and css modules. I decided to use @apply in my code, for example: . editor { @apply max-w-3xl mx-auto my-8 ...
Mounir Habbas's user avatar
1 vote
1 answer
40 views

I want to display my table consecutively like the structure below. +----------+----------+----------+----------+ | Row 1 | Row 7 | +----------+----------+----------+--------...
Mehdi Hasan's user avatar
0 votes
0 answers
46 views

I'm having trouble with CSS Modules in React when trying to override base styles with external ones. The styles passed via className don't seem to take precedence as expected. Problem Description I ...
Глеб Кодрик's user avatar
1 vote
1 answer
2k views

I'm developing a React project with TypeScript and Mantine. I'm using CSS Modules for styling components. However, at seemingly random times, the CSS stops loading (as far as I can observe from ...
Yağız Can Aslan's user avatar
1 vote
1 answer
2k views

I'm trying to setup Rspack inside a Nx monorepo that uses React, module federation, Typescript support and css modules using scss. I got almost everything done except for the last part. The css ...
bbasmer's user avatar
  • 157
-2 votes
2 answers
64 views

This css doesn't display background image .header { height: 85vh; background-image: linear-gradient( to right bottom, rgba(var(--color-primary-light), 0.8), rgba(var(--color-...
Kanan Farzali's user avatar
1 vote
1 answer
73 views

I am using css module like this , .catTable{ border:1px black solid; } in jsx import styles from "../css/basic-styles.module.css"; return ( <table className={styles.catTable}> ...
whitebear's user avatar
  • 12.6k
0 votes
0 answers
96 views

I am attempting to utilize CSS Modules for styling my components, however they do not see to be applied. I've created my React App using Create-React-App, which includes React(18.2.0) and ReactScripts(...
Karoly S's user avatar
  • 3,296
2 votes
1 answer
1k views

<Slider {...settings} // style={{ cursor: "pointer", marginBottom: "10px" }} className={`${classes.services__slider} cursor-pointer mb-10 md:mb:0`} > {...
Prathamesh Chavan's user avatar
0 votes
1 answer
375 views

CSS modules add ID's to the classes e.g. classUc8xi. Since we want to target some elements with Cypress which uses some sort of QuerySelector, I want to know if these ID's ever change? Are they ...
SaroGFX's user avatar
  • 989
0 votes
1 answer
39 views

I am working with ReactJS and I am creating a simple clickable button but here's the problem: It wont show the written message on button when I place it inside a div. Screenshot: Code snippet:HTML ...
Noor Chauhan's user avatar
0 votes
1 answer
583 views

I wonder why my sass modules is not affected when I use third party component. In particular, I use react-horizontal-scrolling-menu <ScrollMenu selected={selected} scrollToSelected={true} ...
Quang Khải Đàm's user avatar
0 votes
1 answer
73 views

I want to ask if css can and should be imported into next pages. is the page structure below acceptable, or what is the standard practice /pages /home index.js index.module.css ...
engrgolden's user avatar
1 vote
1 answer
6k views

I'm using React (create-react-app), ant design 5.3.0 and modular scss. When using embedded components, their styles override mine, because the component creates a wrapper and my styles are hung from ...
Evgeniy S.'s user avatar
0 votes
1 answer
181 views

I am using sass mixed with sass modules to scope styles for each component I found myself importing the variables file at every sass module I import by the new "@use" would that make my ...
1Mouse's user avatar
  • 3
1 vote
1 answer
781 views

I would like to add a part of a classname dynamicall with modules.css. My classnames are arrow1, arrow2, arrow3, arrow4. So I would like to change the number at the end dynamically. className={`${...
Kocher's user avatar
  • 43
1 vote
1 answer
1k views

I have a React component where I'm trying to style a button for my web app. I've done this countless times with other components the exact same way. For some reason, the class names are not being used ...
Middas's user avatar
  • 1,880
1 vote
1 answer
1k views

We are using SCSS, SCSSModule and BEM naming methodology. I have researched the best structure for nested elements. I've seen different syntaxes and still have question mark in my head. I saw the ...
lead.eg's user avatar
  • 96
1 vote
1 answer
790 views

So I'm using css modules in create-react-app project, and for some reason I have this error: in Google Chrome browser: yet, it seems to be like eslint error, because in browser I can close warning ...
Paul Gutsal's user avatar
5 votes
2 answers
2k views

I would like to make a CSS module index.module.css as follows which will be only used by App component : .my-class { color: red; } label { color: blue; } In App.js I use import style from "....
SoftTimur's user avatar
  • 5,770
2 votes
0 answers
759 views

I can't get CSS modules to work in Js - the plain global CSS module file is working, and so are non-specific classes like body are working, however I can't get classes.className to work for example. I'...
user18198641's user avatar
0 votes
1 answer
647 views

I have html stored in the database and I want to render it on my react page and for that I used import low from "../css/low.module.css"; <div dangerouslySetInnerHTML={{__html: data}}/> ...
Anonymous's user avatar
  • 325
0 votes
0 answers
609 views

Is it possible to pass an isolated className to a custom component using CSS Modules, so I can use it inside this component? <CustomComponent className={style.foo}/>
SpritS's user avatar
  • 13
0 votes
1 answer
885 views

Not displaying the output whenever trying on http://localhost:3000/ Not able to understand how to resolve this issue and print desired output Expecting to print a black box on the browser since ...
Shravan Kumar Pandit's user avatar
1 vote
0 answers
175 views

How do I change a single page background, using scss module and react. I have this one page component using this; body { background: $black; background: linear-gradient( 90deg, $black 0%, ...
Guilherme Gonçalves's user avatar
-1 votes
1 answer
268 views

This is the Error shows in the style: <Button style = No overload matches this call. Overload 1 of 3, '(props: { href : string; } & { children?: React Node; classes?: Partial<Button ...
Md Mokarram Hossain's user avatar
2 votes
1 answer
2k views

I'm working on a NextJs project and I've seen 2 ways of importing css classes from a .module.scss file. Option 1: import * as styles from './page.module.scss'; Classes used like this: <div ...
Connor's user avatar
  • 71
1 vote
0 answers
69 views

I was thinking, when I use react css modules I end up with visible class names like Form__module_bhj34 (something like this). What is my goal, to get rid of the first and second part and end up jsut ...
user20251230's user avatar
0 votes
2 answers
1k views

I am trying to make a modal toggle between visible and invisible by applying an invisible or visible class to the surrounding div of the component. In the App component I am using state to pass the ...
DVillan's user avatar
  • 11
3 votes
1 answer
2k views

I want to apply smooth scrolling only to a very specific page in nextjs (say my blog). So I am not using my globals.css file, but I need a way to inject scroll-behavior: smooth; into the html tag for ...
antonwilhelm's user avatar
  • 7,845
5 votes
1 answer
4k views

I'm developing a react project. I use postcss-nested plugin to support css nested rule, and use babel-plugin-react-css-modules to support css modules in react. Finally, the css styles can work well so ...
Chor's user avatar
  • 1,001
0 votes
1 answer
2k views

I can't seem to remove the custom hash on my class names generated by CSS Modules. I'm trying to adjust according to this thread, this medium, this stack overflow, and the web-pack documentation on ...
Richard Tyler Miles's user avatar
0 votes
0 answers
139 views

here is an example: Component.module.css .container {...} .content {...} Component.tsx import style from './Component.module.css' function Component() { return ( <div className={style....
gwtjs's user avatar
  • 121
1 vote
2 answers
3k views

I am facing some difficulty effecting a styling with the ternary operator in an element's className. I created three buttons to render to a particular component when any of them are clicked, and I ...
Edozie's user avatar
  • 13
2 votes
2 answers
2k views

I'm building blog with React where post files are .mdx and I'm using gatsby-plugin-mdx's MDXRenderer to render them as HTML. I'm styling with .module.scss but I can't use module inside rendered HTML ...
ywbird's user avatar
  • 105
0 votes
1 answer
751 views

I am using CSS module along with react. I want to change the border-radius dynamically from react. In the box.css , i set the border-radius as radiusValue. My goal is to modify the value of ...
kendetta's user avatar
1 vote
0 answers
479 views

I'd like to write my css modules in .jsx file. Similarly to styled-components. Here is an example of what I want to achieve (note that this is a single file): // Cmp.jsx file const styles = ???` ....
grabantot's user avatar
  • 2,149
0 votes
2 answers
381 views

I'm in a learning phase of react and I've been trying to nest style of parent in component in child component via class in react.js. How to do it? What I've tried until now: function Card(props) { ...
 अंशुल's user avatar
1 vote
1 answer
603 views

My Navigation bar code import React, { useLayoutEffect, useState } from "react"; import { useQuery,useMutation } from "../../../convex/_generated"; import { Link } from "react-...
BJ GDRX's user avatar
  • 79
1 vote
1 answer
421 views

I have a component that has a sidebar and content as shown below. When the page is refreshed, the first time the component content is loaded below as shown below and in an instant, the components are ...
frsnmk's user avatar
  • 137
1 vote
3 answers
269 views

We have a React project where styles are written like this: import styles from 'styles/sidebar.module.scss' ... <div className={styles.sidebar}>Hello</div> I can't figure how to include ...
Fuego DeBassi's user avatar
1 vote
2 answers
1k views

So in a regular cascading style sheet we can inherit from other styles doing so: .myStyle .temp { height: 100px, width: 80px, } My question is: is there a way for me to do this in react native. ...
T.Cahill's user avatar
12 votes
4 answers
24k views

I've recently been switching to using modules in my next.js project, but I keep receiving this error in my newly created .module.scss files: "Selector ":root" is not pure (pure ...
yoyo's user avatar
  • 583
0 votes
0 answers
430 views

I have this in my React app: <Nav> <BasicBtn>Basic button</BasicBtn> <MainBtn>Main button</MainBtn> </Nav> The font size for buttons is set globally: // ...
grazdev's user avatar
  • 1,313
0 votes
0 answers
711 views

i have some react components that compose css classes, using css modules, as shown in the following example: import React from "react"; import style from "./button.module.css"; ...
Razinar's user avatar
  • 767
2 votes
1 answer
6k views

A React Context provider imports style classes from a module.scss file. When executing this component a selected style class is loaded and passed as the className to child components. import React, {...
pcvnes's user avatar
  • 997
2 votes
0 answers
177 views

i'm styling a React component with css modules. there's a part where i insert html code using dangerouslySetInnerHTML <div className={styles.article_text} dangerouslySetInnerHTML={{__html: props....
caspermc's user avatar
  • 492
2 votes
0 answers
167 views

since i want a unique CSS file for a specific component i decided to use CSS module file but i noticed the import of CSS file of a library that im using called react-image-gallery doesn't work anymore ...
Aasem Shoshari's user avatar
0 votes
1 answer
1k views

I'm new to React. So I found out that there is a CSS mixing problem going on in my React code. So I used CSS modules to solve that problem. But when I'm doing a frontend React JS project with Bootsrap,...
Tharindu Gimras's user avatar

1
2 3 4 5 6