All Questions
10,005
questions with no upvoted or accepted answers
11
votes
0
answers
641
views
AMP style amp-custom returns empty on HTML; results in validation error
I'm using AMP on NextJs and am trying to insert in my head tag. I managed to get it into the head tag but the rendered html returns an empty
<style amp-custom></style>
and instead ...
11
votes
4
answers
7k
views
How to import .scss files anywhere in Next.js app?
I want to convert pure React app to NextJs app. In React app I'm importing .scss CSS files in multiple places of components.
Once I move the code into Next.js environment it is showing error:
Gobal ...
10
votes
1
answer
3k
views
React-Stripe-Elements element not rendering style as expected
I'm trying to setup React-Stripe-Elements and while I was able to get the basic form to render, it does so in a really funky looking way. I even tried to add CSS from a form I found online and it won'...
10
votes
2
answers
5k
views
Apply a class in a Framer Motion tag, animate or initial prop
How do I use a Framer Motion tag, and in the animate and initial props, Apply a class.
Like so.
<motion.div
initial={{ className: 'hidden' }}
animate={{ className: 'visible' }}
>
<div&...
9
votes
2
answers
3k
views
Next.js only loads global.css after manual page refresh. Another also existing styles.js is ignored
As of now the styling happens in two places: global.css + index.js via styled-components
Problem
After start or restart of local server + manual page refresh, all styles are applied as intended. Also ...
9
votes
0
answers
4k
views
You forgot to add 'mini-css-extract-plugin' plugin
I'm using mini-css-extract-plugin in my webpack, version 1.3.6 but when trying to run dev build getting the below error. css and scss both are in the app.
ERROR in ./src/index.css
Module build failed (...
9
votes
2
answers
5k
views
ag-grid webpack css not making to the website
I am using ag-grid in my react app, cannot make the css work with webpack.
grid is looking like this
image:
const path = require("path");
var webpack = require("webpack");
let HtmlWebpackPlugin = ...
9
votes
0
answers
19k
views
How to get colspan=2 in grid css layout?
In my react component I am trying (first time) to use a css grid layout. The column should span 2 but it is only 1:
< Value textAlign="right" gridCol={1} gridRow={index + 3} weight={'regular'}&...
9
votes
1
answer
2k
views
Using mixins in material-ui to customize components in React
I am trying to customize a textfield component in Material-ui with React.
According information from this page:
To customize the colors of any part of the text-field, use the following mixins. We ...
9
votes
1
answer
2k
views
In MUI v5, how do you debug/find a specific element/style/class in the dev tools DOM?
In MUI v4, it's very easy to inspect the DOM and isolate the exact component file and style block within that file:
MUI v4 way of finding a specific element/style class
However, in MUI v5, this is not ...
8
votes
0
answers
2k
views
Change Color flowbite-react Tabs Component (Next js)
Hi can anyone help me on how to change the color of tabs in flowbite-react component, I'm using Next js. I already setup as per doc here https://flowbite.com/docs/getting-started/next-js/
Also I ...
8
votes
0
answers
1k
views
React-beautiful-dnd: Prevent page from scrolling when draggable is being dragged near edge of page
I'm using react-beautiful-dnd in a project and when I'm dragging a draggable, the page auto scrolls if I drag it near the top, bottom or sides of the page. I could theoretically fix this problem by ...
8
votes
3
answers
1k
views
How to prevent nearby text selection when pressing and holding a button on mobile?
I have an application where a user needs to press and hold a button to record audio. However, when a user holds the button on mobile, the browser tries to select nearby text (since the user is holding ...
8
votes
1
answer
3k
views
Not able to import css files in react
In App.js I wanted to import App.css file or any css file. import './App.css' is not working here and giving error " ERROR in ./src/shared/App.css 1:0
Module parse failed: Unexpected token (1:0)
...
8
votes
1
answer
454
views
How to get warnings on undefined CSS variables
Trying to use CSS variables for the first time. Doing it in a react (create-react-app) application, and works great. Only issue is that there's no warnings if I mistype a variable name or just simply ...