Skip to main content

All Questions

Tagged with
10,010 questions with no upvoted or accepted answers
6 votes
0 answers
871 views

Which is the easiest way to inject markup into an iframe with react?

I'm using react to build an app that will allow the end user to enter their own html/css and I wanted to isolate their code from the main app via an iframe (yes i know saving markup to the database is ...
zero's user avatar
  • 3,084
5 votes
1 answer
2k views

Tailwind Inline color decorators are not working with CSS variables

I am using Tailwind CSS with CSS variables for styling in my Next 13 project. What I noticed is that the color previewers/decorators that appear when you define a color are not appearing in my class ...
saimarshadd's user avatar
5 votes
0 answers
1k views

How to use the same background color as a Paper component in Material-UI (dark mode + elevation)

Issue I am trying to create a custom Tab component using the styled method and I want my custom Tab to use the same background as a Paper with an elevation of 1. I have an app that allows light and ...
Sereyn's user avatar
  • 424
5 votes
0 answers
2k views

why css is not work corectly on vite lib mode?

I want to create a new npm package and I have a problem with vite lib mode. I want my package to export some UI components that has some styles, project works fine on yarn dev but when I build it the ...
shayan's user avatar
  • 93
5 votes
0 answers
2k views

How to see the full css code in data-styled="active" on a react website

i went to this site which is a react website in there i tried to find the css file it showed me <style data-styled="active" data-styled-version="5.2.1"></style> how can ...
jackson hill's user avatar
5 votes
0 answers
379 views

Ampersands in MUI styled CSS selectors

When exactly is the ampersand (&) needed before a CSS selector in MUI's styled function? For example, both the following two versions seem to work the same way: // With ampersand const ...
Zizheng Tai's user avatar
  • 6,470
5 votes
0 answers
1k views

MUI - extending sx props to memorize value and avoid rerenders

The sx prop from MUI is useful for speed and code readability (in reason) but it can cause many unnecessary re-renders (and this compounds with the sx lesser performance). So I was wandering if there ...
Clorofilla's user avatar
5 votes
0 answers
569 views

How do I replace dollar sign nested class selectors in MUI 5 for selectors without a global class name?

I've inherited a large MUI project and my first task with it is to migrate to MUI 5. The migration guide tells me to replace any state classes or nested classes that use the dollar sign ($) with the ...
Gisheri's user avatar
  • 1,685
5 votes
0 answers
4k views

Smooth scroll not working with react-router-hash-link

I updated react-router to v6 and now when I add smooth to the HashLink it doesn't even scroll. "react-router": "^6.2.1", "react-router-dom": "^6.2.1", ...
Lily's user avatar
  • 51
5 votes
3 answers
1k views

MUI - How to get theme.mixins.toolbar.minHeight value responsively?

I wonder how to use mui's theme.mixins.toolbar to calculate height: calc(100vh - toolbar)? I am currently trying to do function SwipeCard() { return ( <Box sx={{ height: (theme) ...
Rolam's user avatar
  • 71
5 votes
2 answers
288 views

Slideshow transitions stop working after the first slide

I am creating a slider where when I press the prev or next button the image should enter with a transition effect. The issue is that the transition works only when the page first loads and does not ...
sinfulexiled's user avatar
5 votes
0 answers
674 views

Why the focus of react-select always moves to the first element?

Why the focus of react-select always moves to the first element even if the cursor is in another option? I'm currently using version "react-select": "^4.3.0", <Select ...
Joseph A's user avatar
5 votes
2 answers
2k views

How do I link my javascript files in react when converting from HTML,CSS,JS into JSX, CSS, JS?

I have a typical website created with HTML, CSS, Javascript and I'm trying to convert it into react. I can convert my HTML into JSX pretty easily with an online converter and my CSS is the same, I ...
i am bad at coding's user avatar
5 votes
0 answers
1k views

Is it possible to disable the globally inserted css file from a specific react components?

I have imported a CSS file with global styles in the top-level file index.js. ... import React from 'react' import ReactDOM from 'react-dom' import './global.css' ... ReactDOM.render( <Router&...
Kevin Park's user avatar
5 votes
0 answers
2k views

Material UI class names in production do not resolve correctly

Current Behavior 😯 Class names generated by makeStyles in production break functionalty that apparently works correctly in development mode. The & (nested) operator breaks in production cause the ...
Francisco Rojas Rodríguez's user avatar

15 30 50 per page