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

Conversation

Projects
None yet
1 participant
@tivac
Copy link
Owner

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 added the pkg:svelte label Dec 10, 2017

@tivac tivac merged commit 0216a0c into master Dec 11, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@tivac tivac deleted the svelte-preprocessing branch Dec 11, 2017

@tivac tivac referenced this pull request Dec 11, 2017

Closed

Svelte preprocessor? #373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.