example-framer-esm-setup's People
Forkers
ikettles sonnylazuardi zouyoushun studroid ruucm soheee94 kjk-alaya prodigk jenschaostheory hirajanwin e3radio africademy allisonwhilden morgs32 dav1nx1 sarvex agencyhub wststone changhak0310 brianaaexample-framer-esm-setup's Issues
How to work with css vars?
I'm generating css variabels from Figma Tokens.
I would like to use these variables in a component which I can use in Framer.
This works when the variabels are inserted in the modules.css file directly for example:
// Button.modules.css
:root {
--primary: blue;
}
.button {
background-color: var(--primary);
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
}
But I have a lot of variables, so I'd like to import them via a file vars.css
for example:
// Button.modules.css
@import './vars.css'
.button {
background-color: var(--primary);
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
}
But this doesn't work because after compiling it will just import the file like:
var css = @import "./vars.css";
and Framer doesn't allow this, because all css has to be added to the DOM.
Is there a way to inject all css vars in the DOM, in either modules.css files or in the component directly?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.