Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how dynamique pseudo element in react

app.js

const widthVar = 34;
const someStyle = {
     "--width": widthVar
}
<div className="something" style={someStyle}> </div>
style.css

.something:before{
      width: var(--width),
      // remaining code
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dynamique #pseudo #element #react
ADD COMMENT
Topic
Name
8+1 =