Skip to main content

All Questions

Tagged with
0 votes
0 answers
16 views

CSS Gradient Border Not Applied to Rounded Button [duplicate]

I'm trying to create an html button with a rounded gradient colored border. I am using react css modules. However, the gradient doesn't seem to be applied when both the secondary and rounded classes ...
usr4896260's user avatar
  • 1,497
0 votes
1 answer
131 views

Do CSS modules work with external libraries?

I am using a Slider library (https://react-slick.neostack.com/) in my React project. When I use regular CSS, the slider can be styled correctly, but when using css module, it doesn't work. The tsx ...
Snookums's user avatar
  • 1,310
0 votes
0 answers
78 views

CSS from third-party library, using CSS modules, is loaded in after rendering in nextJS

I created a new nextJS (v14) project using the app. Most components and styling will be done by an external React component library which is installed with npm. This library is styled using CSS ...
NewVigilante's user avatar
  • 1,319
2 votes
2 answers
804 views

vitejs treat all .scss files as css modules

I am working with a legacy package in a monorepo and am including in the optimizeDeps array - is it possible to tell Vite to treat all .scss files it sees as CSS Modules files? Originally asked in ...
JaKXz's user avatar
  • 1,641
0 votes
1 answer
29 views

NavigationBar sub-menu is not clickable

My StackBlitz https://stackblitz.com/edit/vitejs-vite-39yyir?file=src%2Fcomponents%2FHeader%2FNavigationBar.jsx The problem. Sub-menu is not clickable. As soon as you move the mouse, the menu ...
GettingStarted's user avatar
1 vote
0 answers
34 views

CSS styling overridden by another component

I have a React project and a page that has the following components: return ( <div> <ComponentA /> <ComponentB /> </div> ); Both ComponentA and ComponentB ...
EDJ's user avatar
  • 1,001
0 votes
1 answer
44 views

Using React components with css modules, is there a way to affect a parent component's child's class (a cousin once or twice removed) on hover?

Code layout is essentially as follows. //ComponentA.tsx import styles from './ComponentA.module.css' <ComponentA className="styles.componentA"> <div className="styles....
Caledrith's user avatar
0 votes
1 answer
1k views

CSS Modules styling is blocked by CSP wihout unsafe-inline for style-src directive

I have a React app created with CRA and I'm using CSS modules to style the components. I create CSS files with the .module.css prefix. Example: ComponentName.module.css Afterwards I import the CSS ...
lotario's user avatar
0 votes
1 answer
422 views

Why is css/ sass modules not working with third party library?

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
574 views

How to apply word-wrap to ANTD Select title and dropdown items so that it changes the height of the element?

I want my ANTD title/selected item to go to the next row and modify the height of the Select. I have worked on this example: https://codesandbox.io/s/basic-usage-antd-4-24-7-forked-8jzp29?file=/demo....
GeorgeMet's user avatar
0 votes
2 answers
257 views

multiple conditions for styling with Css modules

I am trying to set multiple conditions with ternary operator to style an element using Css modules. I can't find the exact syntax. is it even possible? there are some boxes that have 3 sizes , their ...
Fateme Hemmati's user avatar
0 votes
0 answers
120 views

What is the most optimal way of using media queries for responsiveness if I am using single custom created styled component

I have defined this component, and I am using it everywhere in my project to avoid repetitive style definitions: import React from "react"; import styled from "styled-components"; ...
gylman's user avatar
  • 1
4 votes
2 answers
1k views

CSS modules don't privatize element type selectors

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,234
1 vote
1 answer
101 views

Advanced Search and Replace for .module.css

I was using the conventional import './App.css' and just use className to effect the styling for my react application. I structured my react app to have a dashboard view component that renders the ...
Joseph Etim's user avatar
0 votes
1 answer
766 views

css styles not applied CSS Modules react

I am using react-scripts: 5.0.1 with module.css files where I have my styles. One of my style files looks something like this. First I have to note that some module.css works fine. It seems the ...
Jason Krowl's user avatar

15 30 50 per page
1
2 3 4 5
13