Add Tailwind CSS to Blazor! | Build a Blog - Ep 01

  Рет қаралды 2,065

ScriptBytes

ScriptBytes

Күн бұрын

In this video of the Build a Blog series, I set up our initial Blazor application and I show how to add Tailwind CSS to it. By default Blazor apps come with Bootstrap included, but I prefer to strip it out and use Tailwind.
I show how to set up and configure Tailwind config file and how to use the Tailwind CLI along with npx to create the final css file.
I also give some hints on how to run the tailwind cli command along with the dotnet watch command in Jetbrains Rider.
Code from this episode:
github.com/Scr...
Code for the whole series:
github.com/Scr...
Follow me on social media!
Instagram: / scriptbytes
Threads: www.threads.ne...
Check out my blog!
scriptbytes.io/

Пікірлер: 24
@raphaellukas3328
@raphaellukas3328 20 күн бұрын
Thank you very much for this video. This is what I was looking for :-)
@oncalldev
@oncalldev 10 ай бұрын
You have a very direct approach in your tutorials - getting from Point A to B as fast as you can. I assume that you're gearing this series more towards intermediate developers who can fill in the gaps and may not require extended explanations. Using a Mac, JetBrains, and introducing NPM seem more to unnecessarily complicate things - although they are fine platforms/tools. I've worked in software development for a long time and I use KZbin videos to learn something new, reinforce what I know, and basically see things in a way I may not have known about before. Your videos certainly seem to fall into the latter category for me and I'm fine with that and will continue to follow your series. If your intent is to onboard newer developers or those new to Blazor, it may not be the right combination.
@scriptbytes
@scriptbytes 10 ай бұрын
You are 100% correct. I am assuming most viewers have a general knowledge of C# and web development concepts if they are watching my videos. I also know using a Mac and Rider might be weird for a .Net/Blazor app, but I’m ok with that. This is the same setup I use in my day job with a full .Net/Microsoft stack and rarely have issues. I think most things are similar enough to Visual Studio that it (hopefully) won’t be too confusing to viewers, but we’ll see. I appreciate the feedback though! Thank you!
@AlejandroBiancucci
@AlejandroBiancucci 5 ай бұрын
Great set up video. Straight forward and easy to follow. My development experience is so much better with this set up. Keep it up!
@shahnawazk
@shahnawazk 10 ай бұрын
Thanks for all you are doing, keep it up. Looking forward to learn new Blazor stuff.
@scriptbytes
@scriptbytes 10 ай бұрын
Thanks!
@larsthomasdenstad9082
@larsthomasdenstad9082 6 ай бұрын
Awesome and quickfire video. Only possible improvement would be commands in description. Subscribed.
@CyberWalkerX
@CyberWalkerX 9 ай бұрын
Look forward to update
@paulh6933
@paulh6933 10 ай бұрын
thanks for using the cli!!!
@Duelweb
@Duelweb 7 ай бұрын
You have an "unhandled exception" error when your app runs. I have same, which prevents project from running.
@scriptbytes
@scriptbytes 7 ай бұрын
Thanks, I'll try to get it fixed soon.
@gianfrancodiaz6486
@gianfrancodiaz6486 7 ай бұрын
This may be useful for somebody watching this tutorial: If you are using Visual Studio and you'd like to run automatically before the project compiles, you may copy and paste this XML code inside your Blazor server .csproj (after you defined the *tailwind:dev command* inside your *package.json* file): What does it do? It runs the content of the specified command in package.json BEFORE compilation. I added a 3000 ms delay in case Tailwind needs extra time to finish running since you want the output CSS ready before the execution.
@scriptbytes
@scriptbytes 6 ай бұрын
Great info, thanks!
@MarkTulewicz
@MarkTulewicz 7 ай бұрын
I tried this in the latest visual studio... but for some reason i get a very different app.css when it inspect, than what I see in the app.css that tailwind generates. my text-red-800 is in the tailwind app.css, but when I run its not there.
@MarkTulewicz
@MarkTulewicz 7 ай бұрын
Fixed: I had to rename app.css to tailwind_app.css it seems something in visual studio writes out a app.css on top of it while compiling?
@scriptbytes
@scriptbytes 7 ай бұрын
Glad you got it working!
@lerocher2182
@lerocher2182 8 ай бұрын
Nice! How can I do all this in Visual Studio 22?
@scriptbytes
@scriptbytes 8 ай бұрын
Everything should be the same except the last part where I showed how to run the steps in parallel. Unfortunately I haven’t used VS in a year or so, so I’m not sure exactly how that’s done, but I would assume there is a similar way of doing it.
@Duelweb
@Duelweb 7 ай бұрын
Followed your directions, but intellisense does not show up in my home page ?
@scriptbytes
@scriptbytes 7 ай бұрын
I think another person commented they had to install the tailwind extension.
@Duelweb
@Duelweb 7 ай бұрын
@@scriptbytes Thanks, yes this solved the problem.
@CHACAL8949
@CHACAL8949 9 ай бұрын
How to create a component library and use tailwind?
@scriptbytes
@scriptbytes 9 ай бұрын
This is something I haven't dug into really deep yet, so I'm not 100% sure this is right, but more than likely I think you'd want to use a Razor Class Library to put all of your components into. Then you could package these up into a dll or nuget package and use across multiple projects. As for using Tailwind in it, I think just make sure you are using the tailwind CLI in the project that consumes the components and it'll work? I'd have to test it out though.
Blog Layout and Design | Build a Blog - Ep 02
17:21
ScriptBytes
Рет қаралды 608
TailwindCSS. Полный курс
1:55:05
webDev
Рет қаралды 65 М.
Synyptas 4 | Арамызда бір сатқын бар ! | 4 Bolim
17:24
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,8 МЛН
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 19 МЛН
The Blazor Competitor is Here!
15:08
Nick Chapsas
Рет қаралды 72 М.
Create Beautiful Blazor WASM Tailwind Apps
9:13
ServiceStack
Рет қаралды 7 М.
Blazor 8 Docker  | Build a Blog - Ep 04.5
13:16
ScriptBytes
Рет қаралды 2 М.
Blazor Localization in .NET 8 & Blazor Server
13:58
Claudio Bernasconi
Рет қаралды 8 М.
Manually Deploy to Cloud Run - Updated for Artifact Registry
11:04
Blazor Server with Tailwind
19:08
CodingWithGreg
Рет қаралды 562
Building Beautiful Blazor Apps with Tailwind CSS | DevReach 2023
28:44
Progress Telerik
Рет қаралды 1,8 М.
Please, don’t use viewport units for font sizes
9:55
Kevin Powell
Рет қаралды 19 М.