Skip to content

ML fixes; properly import @tailwind & use @apply; fix ./json import#3

Open
trulycool wants to merge 3 commits intodgwyer:mainfrom
trulycool:ml-fixes
Open

ML fixes; properly import @tailwind & use @apply; fix ./json import#3
trulycool wants to merge 3 commits intodgwyer:mainfrom
trulycool:ml-fixes

Conversation

@trulycool
Copy link
Copy Markdown

Greetings!

I filed an issue w/ your repo earlier. But as I continued to experiment, I noticed that tailwind was not properly integrated w/ the *.scss files...i.e. the @tailwind imports were not working, and I couldn't use the @apply directive.

Finding it unlikely that using SASS & PostCSS / Tailwind was necessary, I implemented the simplest fix.

Renamed all the *.scss files allow the @tailwind imports to work properly. It also allows use of the @apply directive, so that rather than reverting to custom CSS, you can do things like:

.my-class {
    @apply rounded-2xl bg-green-500 text-[#arbitrary-color-value]
}

NOTE: #arbitrary-color-value has to be an actual valid CSS color value; used as example/documentation of what the brackets mean here...

Also fixed the ./json import error issue.

Thanks again for sharing your code!

I just started implementing custom Gutenberg blocks on a headless WordPress project, w/ SvelteKit & TailwindCSS for the frontend, and while Tailpress allows a similar end result (i.e. using Tailwind to style the blocks in the editor & frontend), having the blocks generate the actual compiled CSS seems like a great option for future projects, where perhaps Tailpress as the main theme wouldn't work.

All the best,
Morgan
😌🙏

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

Successfully merging this pull request may close these issues.

1 participant