Skip to content

Add razor/cshtml pre processing #17027

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

Merged
merged 2 commits into from
Mar 7, 2025
Merged

Add razor/cshtml pre processing #17027

merged 2 commits into from
Mar 7, 2025

Conversation

RobinMalfait
Copy link
Member

This PR fixes an issue in Razor template files where @sm:flex doesn't work and @@sm:flex is required.

In Tailwind CSS v3, some people used a custom transform to replace @@ with just @. But in Tailwind CSS v4 we don't have this.

However, we can add a pre processor for .cshtml and .razor files.

Fixes: #17022

@RobinMalfait RobinMalfait requested a review from a team as a code owner March 7, 2025 10:39
@@ -468,6 +468,7 @@ pub fn pre_process_input(content: &[u8], extension: &str) -> Vec<u8> {
use crate::extractor::pre_processors::*;

match extension {
"cshtml" | "razor" => Razor.process(content),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RobinMalfait RobinMalfait merged commit d18fed1 into main Mar 7, 2025
5 checks passed
@RobinMalfait RobinMalfait deleted the fix/issue-17022 branch March 7, 2025 11:02
@senneclaeskens
Copy link

@RobinMalfait
I've added additional comments in #17022

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.

Content transform in css config
3 participants