css-modules Questions
6
Solved
I am trying to do a simple animation using React, keyframes, CSS modules (and SASS). The problem is that CSS Modules hash keyframe names the same way it hashes the local classes.
JS code
//...
...
Physicist asked 24/8, 2019 at 0:59
5
Solved
I'm busy learning React with CSS-Modules and I don't quite understand how one would store variables? For example, in Sass you're able to do this:
// _variables.scss
$primary-color: #f1f1f1;
// h...
Kall asked 24/11, 2016 at 6:45
5
Solved
I'm using electron-react-boilerplate for my project and this boilerplate is using css-modules for styling purpose.
I'm having trouble with using bootstrap and custom style at the same place.
Suppos...
Dictatorship asked 11/5, 2017 at 14:0
2
I've started using CSS modules, however I cannot find any examples of how exactly this works:
:local(.class){
/* some property */
}
All classes are local by default, so what does :local or :glo...
Labellum asked 5/9, 2017 at 11:5
10
How to import CSS modules in Typescript with Webpack?
Generate (or auto-generate) .d.ts files for CSS? And use classic Typescript import statement? With ./styles.css.d.ts:
import * as styles fro...
Antimonic asked 26/12, 2016 at 22:22
25
I'm trying to import a theme from a CSS module but TypeScript gives me a "Cannot Find Module" error and the theme isn't applied on runtime. I think there's something wrong with my Webpack config bu...
Hypocycloid asked 2/11, 2016 at 14:45
3
Solved
I try to use css modules in my project. I'm using latest Create React App with react-scripts version 2.1.8.
In the docs it says I can add CSS Modules, and i dont have to do eject script.
I tried ...
Juliettajuliette asked 7/4, 2019 at 17:51
5
Is it possible in one CSS Module to use a class from another CSS Module?
The problem is that CSS Modules is doing it's own class names translation and so .class from A.css will become A-module--cla...
Turnbuckle asked 31/7, 2020 at 23:45
6
I am using VS code for a project using CSS Grid and CSS Modules. However when I try something like this
.loginRegisterDiv {
composes: loginDiv;
margin: 0px;
width: 100%;
}
I get an error sayi...
Machutte asked 28/2, 2017 at 22:51
2
Here's my code (just a very basic setup). All the files are in the same folder.
I am using create-react-app.
User.tsx:
import React from "react";
import styles from "./User.module.scss";
const U...
Marinetti asked 7/5, 2020 at 9:1
10
I'm using webpack, react-datepicker and have managed to import its css with the provided css module.
import 'react-datepicker/dist/react-datepicker-cssmodules.css
The component looks fine and dan...
Pegues asked 22/4, 2019 at 12:55
6
Solved
Is there a way to configure emmet in visual studio code to use React's CSS modules?
When I type... div.container and hit tab, it becomes <div className="container"></div>
The problem ...
Poetess asked 7/11, 2018 at 15:58
4
Solved
How can I edit localIdentName field of css-loader in Webpack configuration in Nextjs so that I can hash/hide/obfuscate css class names?
The example below is from the New York Times. Note the class ...
Pharyngology asked 22/3, 2021 at 11:2
5
Solved
I am using css modules with Sass in next.js and I got this error
:global {
.slick-track {
display: flex; // Syntax error: Selector ":global .slick-track" is not pure (pure selectors mus...
Lulualaba asked 1/2, 2021 at 0:0
2
Solved
I have understood the concept of CSS modules so much that I am convinced that I do not want to do anything else that that for the future.
Currently I am trying to refactor an existing app to use C...
Woe asked 3/3, 2017 at 20:3
4
In my project, I use CSS Modules with Less, which means I get the best of both worlds.
My src folder looks something like this:
components/
[all components]
theme/
themes/
lightTheme.less
dar...
Cornia asked 17/1, 2020 at 12:44
2
Does anyone know any tool which would help to highlight classes that are not used in css-modules?
Recently I have added typescript-plugin-css-modules to my project which helps me to detect if I use...
Outrush asked 19/4, 2020 at 13:15
3
Solved
I'm building a react app using material ui and nextjs. I'm using <Autocomplete /> component, provided by material UI and override some its styles with my own like this:
<Autocomplete
clas...
Vibrate asked 25/12, 2020 at 23:16
6
Solved
I am trying to use CSS Modules in my React project. First part of the problem is that if I write nested css classes (using sass), I don't know if I can access the inner ones, since those seems to b...
Departed asked 1/12, 2016 at 7:55
2
I'm fairly new to Vue Test Utils and CSS Modules. I've got my Vue component set up using CSS Modules and everything works fine in the app and my Storybook. For example my BasicButton:
<template&...
Nelsonnema asked 10/9, 2020 at 17:34
7
Solved
I want to use Next.js with Sass and CSS modules but also want to use Ant Design and wanted to use the Less styles for smaller building size.
I'm able to enable either CSS modules or Less loader but...
Traylor asked 16/4, 2020 at 0:5
3
In some SCSS files, I see the following:
:global {
/* ... */
}
I don't know if it is an SCSS feature or a CSS feature.
I tried searching about it but couldn't find any good results at first sig...
Taxexempt asked 25/4, 2017 at 14:32
0
I'm migrating my project from create-react-app to Vite.
Among my styles there is a following fragment:
// Button.module.scss
.btn {
border-radius: 8px;
border-style: solid;
padding: 8px;
cursor...
Excretion asked 26/1, 2023 at 8:31
4
Solved
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 selec...
Atbara asked 18/5, 2022 at 17:22
11
Solved
I'm using the following code to dynamically set a className in a React component based upon a boolean from props:
<div className={this.props.menuOpen ? 'inactive' : 'active'}>
...
</div>...
Trickster asked 14/7, 2016 at 18:56
1 Next >
© 2022 - 2024 — McMap. All rights reserved.