Comments (10)
That would be really nice. 👍
Another Workflow
variables.css contains
:root {
var-accent: #f00;
}
typo.css contains
a {
color: var(accent)
}
styles.css contains
@import url(normalize.css);
@import url(variables.css);
@import url(typo.css);
from myth.
+1 i think, this sounds like a cool addition. would be nice to support the media queries allowed for imports as well (dunno if sass/less do this automatically)
from myth.
+1
from myth.
+1
from myth.
+1
from myth.
+1 and could the output.css file be compiled with the @import'ed files inline - much like I guess how less and sass build a final file, also would be nice to have a flag for minification?
from myth.
if someone wants to try PRing this i'd be happy to help get it merged in this coming weekend or something. the tricky part i ran into if i remember correctly was the source mapping for the imported files which i think the current import plugins don't handle well. maybe we just say screw source maps for now
from myth.
+1, willing to help but not sure where to start.
from myth.
+1
and i would suggest the following
variables.css
:root {
var-accent: #f00;
}
sample.css
@import url(variables.css);
a {
color: var(accent)
}
$ myth sample.css sample.css
output
sample.css
a {
color: #f00
}
so it will just replace the vars and remove the @import so you you can keep all your separate css files and modifiy them later in the build process. e.g.: if you are using a cms which concats and minifies the files
from myth.
added in 1.0.0
! you need to pass { source: '/path/to/source' }
as an option so it can know where to read from
from myth.
Related Issues (20)
- Prefixes not working HOT 1
- Watch @import files HOT 4
- debugger in tests HOT 1
- Support external source maps
- may be the prefix should be add to some css value too? HOT 2
- Add ignore-errors option HOT 1
- Myth Logo? HOT 1
- Passing options, such as paths, to importer HOT 3
- Test suite hangs, then fails HOT 1
- Update rework-import dependency
- What is to be the fate of this project? HOT 8
- Support inline css / Polymer style modules
- Problem with Node 6 HOT 2
- Calc Inaccurate? HOT 2
- Define variables in media queries?
- var not allowed in media (declaration)
- Only for node.js ? HOT 1
- obj.hasOwnProperty is not a function HOT 7
- Is this project still maintained? HOT 2
- myth.io error HOT 1
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.
from myth.