Reference another file without importing? #12481
Unanswered
TheXenocide
asked this question in
Help
Replies: 1 comment
-
Just wanted to check back here before I get back to my prototyping. I'm assuming since there hasn't been any replies that tailwind does not currently support component isolation or multiple output files which are capable of referencing each other and is not likely to meet my needs anytime soon, so I should start considering other CSS processing engines? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Still new to tailwind so sorry if this doesn't make any sense.
I'm trying to get Tailwind working with Blazor CSS Component Isolation without re-importing all the base styles on per-component css files but can't seem to find if it's possible to reference a global css file from a component css file without actually including the processed content of the referenced file?
Basically, let's say I have the following:
Transformed to
wwwroot\css\App.css
during build, which is<link>
ed globally in the master layout.Includes all
@tailwind
importsTransformed to
.\MyComponent.razor.css
during build.Wants to reference classes defined in
App.tcss
using@apply
without including the compiled content ofApp.tcss
since that output file is already included in the master layout.Blazor has its own CSS post-processor for component css files which happens automatically if a file is named
<RazorComponent>.razor.css
in the same directory as<RazorComponent>.razor
. This step is occurring later in the build than the transformation fromMyComponent.razor.tcss
toMyComponent.razor.css
and Blazor is able to process the output file fine.Is there a way to do this? Would it be feasible to make this possible? Maybe something like
@reference <someOtherCssFile>
would be helpful so Tailwind inputs can be output into multiple separate css files without redundancy?Beta Was this translation helpful? Give feedback.
All reactions