akanix42 / meteor-css-modules

MIT License
92 stars 19 forks source link

Path resolution with composes #86

Closed arggh closed 7 years ago

arggh commented 7 years ago

Right now I have to provide an exact relative path to composes, like this:

.button {
   composes: rounded from '../../../../../../../../styles/shared/button.m.css';
}

Wouldn't it be nice to be able to declare the files or folders to search for, if the given path fails?

// First, add button.m.css to package.json as a global shared file for composes

// then...
.button {
   composes: rounded from 'button.m.css';
}

Or is this already possible somehow?

akanix42 commented 7 years ago

This isn't currently possible, but you can use absolute paths instead of relative paths. If styles is under your Meteor project root, you can do this: composes: rounded from '/styles/shared/button.m.css';

arggh commented 7 years ago

That works just fine, thanks!