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

Add support for Master CSS #589

Open
ansarizafar opened this issue Apr 1, 2023 · 2 comments
Open

Add support for Master CSS #589

ansarizafar opened this issue Apr 1, 2023 · 2 comments

Comments

@ansarizafar
Copy link

ansarizafar commented Apr 1, 2023

Is your feature request related to a problem? Please describe.
I want to use Master CSS with Svelte in <style> block

Describe the solution you'd like
Master CSS is a new virtual CSS language with an enhanced and concise syntax.

<h1 class="heading">Svelte + MasterCSS = A great Combination</h1>

<style lang="mcss">
.heading {
    fg:blue-70 font:medium p:10
}
</style>

Describe alternatives you've considered
There is no alternative

How important is this feature to you?
It would be great If we can use MasterCSS in <style> block.

Additional context
Master CSS website https://css.master.co/
Master CSS 2.0 Beta website https://beta.css.master.co/docs/guides

@kaisermann
Copy link
Member

kaisermann commented Apr 3, 2023

Hey @ansarizafar 👋

You can add support for it by defining a mcss property on svelte-preprocess options. You can then use Master CSS's compiler API to compile the style tags.

@ansarizafar
Copy link
Author

@kaisermann Yes, I have used compiler API.

<div class="content">
    <h1 class="heading">About Page</h1>
    <a class="primary-btn" href="/">Go Home</a>
</div>

<style lang="mcss">
    .content::flex flex:column gap:10 p:30
    .heading:: fg:green-70
    .primary-btn::bg:blue-70 fg:white bg:blue-60:hover px:20 py:10 w:fit-content
</style> 

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants