Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte preprocess support #374

Merged
merged 19 commits into from Dec 11, 2017
Merged

Svelte preprocess support #374

merged 19 commits into from Dec 11, 2017

Conversation

tivac
Copy link
Owner

@tivac tivac commented Dec 10, 2017

Adds both modular-css-svelte for usage with svelte.preprocess() and modular-css-svelte/rollup for usage with rollup-plugin-svelte.

Allows for writing modular-css within <style> tags in a svelte component!

<h1 class="{{css.title}}">Hello</h1>
<div class="{{comparison ? css.one : css.two}}">Ok</div>

<style>
.title {
    composes: otherClass from "./other-file.css";
    composes: global(anotherClass);
}

.one {
    color: red;
}

.two {
    color: blue;
}
</style>

See README.md in PR for all usage examples.

@tivac tivac added the feature label Dec 10, 2017
@tivac tivac self-assigned this Dec 10, 2017
@tivac tivac merged commit 0216a0c into master Dec 11, 2017
@tivac tivac deleted the svelte-preprocessing branch December 11, 2017 08:01
@tivac tivac mentioned this pull request Dec 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant