Skip to content

@container-queries don't seem to work in blazor #9895

Answered by thecrypticace
tecxx asked this question in Help
Discussion options

You must be logged in to vote

This is happening because your content files contain @@ (because you have to escape them). If you copy & paste that code into Tailwind Play you'll see that it's not picked up. The reason for this is Tailwind reads but does not understand your source files. I would suggest using our transformers feature to "unescape" the @s in your source code.

I think something like this would be sufficient:

module.exports = {
  content: {
    files: ['./src/**/*.razor'],
    transform: {
      // `razor` here is the file extension of your razor view files
      razor: (content) => content.replace(/@@/g, "@"),
    }
  },
  // ...
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@tecxx
Comment options

@JoshuaMorley
Comment options

@McGern
Comment options

Answer selected by tecxx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #9892 on November 21, 2022 22:52.