css-modules Questions

2

Solved

Let's say we have a third-party CardComponent like this <Card title="This is a title in the header">This is text in the body</Card> And this renders in plain HTML <div cla...
Cliff asked 23/7, 2020 at 9:54

1

Solved

I use React in combination with TypeScript, I have a separate CSS file for each component. I import my CSS file as follows: import styles from 'pages/login/Login.module.css' Assigning a className ...
Spigot asked 2/11, 2022 at 13:50

3

Solved

In my React Form which I had created using React Formik library, I want to change the style of my input element's border color to 1px solid red whenever there is an error. But as we know react for...
Tarnetgaronne asked 8/6, 2020 at 7:5

2

I'm trying to create a React project with typescript using webpack. But I can't manage to get CSS modules working. I keep getting this error when trying to import the CSS files in typescript: ERROR...
Antoninaantonino asked 29/9, 2020 at 19:57

2

Solved

I'm using CSS modules (.scss) with Next.js and have a kebab naming-convention. In other words, something like this: .member-btn { background: #fff; } The problem that I'm facing is that in order ...
Marsupial asked 12/10, 2022 at 8:1

3

Solved

I have a custom modal where I have 2 react-select components inside. The modal body is ready to auto scroll in case the content exceeds its size, but the react-select components dropdown open insid...
Handbarrow asked 26/2, 2019 at 17:4

1

Solved

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...
Lexicology asked 8/9, 2022 at 7:56

2

Solved

I'm writing a small React app with Create-React-App. For simple styling tweaks I use tachyons-css. Due to frequent reappearing CSS styling issues I recently switched from classic CSS styling to CSS...
Sato asked 16/8, 2019 at 11:31

6

Solved

So I am building a react application and have a quick question. If I have two separate components: and with CSS classes navigation.css and navigationLogo.css respectively. In navigation.css I h...
Reeva asked 12/2, 2017 at 18:43

2

I'm using React with SASS and CSS Modules. How can I style the children component without passing a new ClassName or something like that. For Ex. I want to position or do some styles over the chil...
Arcuate asked 7/6, 2018 at 17:20

3

Solved

I am using css modules, however a library I use in a component to append tweets with JavaScript adds some elements to my component in the following structure: <div class='user'></div> ...
Gantlet asked 15/12, 2015 at 1:22

4

I am trying to use Storybook v5.0 with my project and I am using React + Webpack4 + CSS Modules. ( I am not using CreateReactApp) My setup is quite simple, and I was able to setup Storybook withou...
Afroasiatic asked 12/3, 2019 at 10:37

2

My css-module is not working with Storybook. There are not any error, it is only not working. I don´t understand what is the problem. This is the image of how storybook is rendering the button: Bu...
Stonefly asked 20/11, 2021 at 3:1

2

Solved

So, I have appended a home class to body like so: document.body.classList.add("home") I want to select appContainer a child element of body class by doing html body.home #appContainer { .......
Ashelyashen asked 26/2, 2017 at 0:32

2

I'm trying to figure out a good workflow of how to use Tailwind together with CSS Modules in Next.js, but I'm running into some tricky problems regarding specificity and the order in which styles a...
Foredo asked 16/3, 2021 at 15:20

3

Problem create-react-app v2+ supports TypeScript and CSS Modules out of the box... separately. The problem arises when you try to use the two together. Facebook had an extensive discussion about t...
Comfy asked 14/10, 2019 at 15:45

6

Solved

I am using a React component library (React Toolbox), which is outputting this class in their Tab component using CSS Modules and Webpack: label___1nGy active___1Jur tab___Le7N The tab is a classNa...
Whacky asked 4/2, 2016 at 19:31

3

Solved

Lets say in my global.css file of a Next.js project I have: .flex { display: flex; justify-content: center; align-items: center; height: 100%; } I also have a Layout.js component and a Layout....
Amary asked 16/2, 2021 at 0:36

3

How to config next.js to support Simultaneous tailwind css with css modules? I want tailwindcss wrap whole project: // /tailwind.scss :global { @import "tailwindcss/base"; @import "tailwindcss/c...
Shoffner asked 26/10, 2019 at 18:38

2

Solved

I'm using CSS Modules (Sass) with rollup on a component library project, which is working well. Each component ends up with a dist folder containing a single JS bundle file, and a corresponding CSS...
Glop asked 20/2, 2019 at 22:44

11

Solved

According to a tweet by Dan Abramov, CSS modules support is there in create-react-app (CRA). One just needs to give extension of module.css to his stylesheets to enable the feature, but this is not...
Tamayo asked 8/5, 2018 at 13:32

3

Solved

I want to use the .scss in my project(bulid with react and typescript),so I use typings-for-css-modules-loader with css-loader and sass-loader. When I npm run dev, I get this error: ./src/Common....
Dann asked 14/5, 2019 at 14:42

3

Solved

I have a component: import React from 'react'; import * as styles from './RedComponent.css'; class RedComponent extends React.Component { render () { return <div className={ styles.red }>...
Evans asked 14/11, 2017 at 18:7

1

Solved

I want to be able to select styles.scrollValue using the document.querySelector() import { useEffect } from "react"; import styles from "./Navbar.module.scss"; const Navbar = (...
Bearded asked 18/10, 2021 at 14:26

2

Solved

I have a React component with the following files: src/components/HomePage/index.js src/components/HomePage/style.scss The component is very simple: import React from 'react'; import './style.scs...
Asaasabi asked 25/7, 2020 at 20:31

© 2022 - 2024 — McMap. All rights reserved.