All Questions
1,228
questions
0
votes
0
answers
18
views
React application not correctly "pathing" my image
I have a React application created using Vite. I am also using Styled Components. Everything works fine, except when I specify my background image, it is not creating a correct path.
As you can see, ...
0
votes
2
answers
58
views
Styled Components styles are not applied
I've a react popup which uses styled-component for styling. I'm rendering the react app in shadow dom. Because I didn't want any other css file to modify the popup. It is working on most sites except ...
0
votes
1
answer
37
views
Make left column of table sticky using React Styled Components
Using styled components, I have created the following styled elements. My objective is to make the first row and column "sticky", so when the user scrolls through the table they always ...
0
votes
0
answers
17
views
How to make a section sticky with links react-intersection-observer
I've experimented a bit with react-intersection-observer but I'm quite new at it and doesn't seem to grasp how to make the stickyness smooth in mobile.
I have a sticky section containing a couple of ...
0
votes
1
answer
39
views
How to change the styling of FloatButton from AntDesign?
I am trying to customize my FloatButton component some custom CSS and can't find out how to do it for the background color and for the Icon that is displayed in it. I tested with this code but it ...
0
votes
1
answer
35
views
React MUI Cards not able to have same height
I have a dashboard with 3 cards which has 3 seperate components called in them. The height of the cards expand according to the content each has. I want to have all 3 cards have the same heights as ...
-1
votes
1
answer
63
views
React component which renders children component by self incrementing the padding css value
Hi I am trying to achieve a usecase where in a react component sends some padding value to styled components by self incrementing it based on how nested it renders.
Lets say there is a List component ...
0
votes
1
answer
37
views
How to hide scrollbar track (with no overflow)
Problem
This scrollbar track appears all on pages whenever user reloads the page. It is not there initially.
It's strange considering that there's no overflow (hence the lack of a scrollbar) and yet a ...
0
votes
0
answers
47
views
Choosing Between @mui/material/styles and styled-components for Styling MUI Components in React
I'm currently working on a React project using Material-UI components, and I'm trying to decide whether to use @mui/material/styles or styled-components for styling. I understand that both have their ...
1
vote
1
answer
23
views
how to import shared css with Styled-components
Im using styled-components in my react project. I want to create a shared loading background. I have the following definition:
const loadingAnimation = keyframes`
0% {
background-position: 95% 95%;
}...
0
votes
0
answers
17
views
React margin prop affecting other components
When I apply margin to a component in my React application, it seems to unintentionally affect another component as well. For instance, when I add margin to Component B, Component A also appears to ...
0
votes
1
answer
75
views
Responsive css grid with fixed rows and maximum columns but can show more items
I'm trying to create a grid component where the layout is 2 rows and x columns. Columns can be max 6 and the grid items are react children of unknown amount, hence the x columns.
I got a grid down but ...
0
votes
2
answers
49
views
Can't Get styled-components to Pass any props
So I just began using styled-components and I'm sorry if there is some very basic error I'm making. But I've looked over the docs a dozen times now and can't find any way to get it to work with ...
0
votes
0
answers
51
views
Border under selected element
When I select one element, I know that the bottom border shouldn't be displayed under that one. It should look like in this image CSS Border.
Code:
CSS:
import styled, {css} from "styled-...
0
votes
2
answers
82
views
CSS properties with conditional styles and falsy values
I'm looking for the answer to the question how should I use styles with conditional operators.
What code example would be the best? Can we use non-CSS values such as undefined, null, false, etc.?
...