For that one person who is under a time crunch Embedding Google Fonts: 0:37 Self Hosted Fonts: 7:22
@N32-e1g2 жыл бұрын
life saver bro
@hmatpin3 жыл бұрын
Man, thanks for not monetizing this great channel
@codenameunknown37913 жыл бұрын
8:13 looool. Big shoutout to Mr. Wes Bos out there.
@simonswiss3 жыл бұрын
Haha I was waiting for those comments 😅
@kayf70733 жыл бұрын
Great. Remember, when your website is also seen by people living in europe, including files from external sources like google is against eu gdpr law, because it transfers personal data (ip adesss) to other parties (worst of all: in the us) without prior consent. So selfhosting fonts, scripts, images etc is the only way to go
@moracabanas3 жыл бұрын
I cannot believe this thing wth is going on laws...
@JimOHalloran3 жыл бұрын
Woohoo! Simon is winning at CSS and Year 4 Miniball! Division 1 no less!
@mohabedr50303 жыл бұрын
Tailwind is the future
@Max-xp3tf3 жыл бұрын
The future is Tailwind *
@81NARY3 жыл бұрын
And the future is now!
@Max-xp3tf3 жыл бұрын
@@81NARY 👀
@nitro41092 жыл бұрын
And I'm from future
@saschamajewsky79903 жыл бұрын
When Tailwind CSS Merch?
@ruslansteiger3 жыл бұрын
Primus Utilitatem
@moracabanas3 жыл бұрын
If you import fonts with @import and extend your tailwind.config.js you must rebuild. HMR just won't apply that font until you Ctrl + c your Node terminal. It took me 3h to point that. At least using windicss
@melissawhite75222 жыл бұрын
Learning Tailwindcss and just wanted to say thanks for the reminder. Was totally like "why ins't this working." and forgot the rebuild. :)
@shivankbatra5643 Жыл бұрын
thanks a lot man, 5hr for me to be precise and was about to give up before I saw this comment. Feeling really stupid but finally it works!
@yassminh Жыл бұрын
This comment should be pinned. You have saved me from wasting hours trying to figure out why it didn't work. Thank you!
@davidluhr3 жыл бұрын
Another great video, Simon! Bonus tip: use `font-display: swap;` in your `@font-face` declarations for a performance boost. This allows the browser to render first paint more quickly by displaying the system font as soon as possible, and then "swapping" to your custom fonts once they become available. It prevents the infamous FOUT (Flash of Unstyled Text) 😉
@simonswiss3 жыл бұрын
Totally, that would have been a great addition to this video 👍
@robyroby1623 жыл бұрын
Actually this brings FOUT back by design!
@davidluhr3 жыл бұрын
@@robyroby162 Sorry, I meant FOIT (Flash of Invisible Text). Thanks for correcting me!
@pedromartindelcampogonzale96133 жыл бұрын
Your vídeos are really uplifting, love your attitude.
@RobertWildling Жыл бұрын
Great and important video! - I Austria there is a weird law case going on, where a woman accuses more than 1000 website owners of not having been explicit enough about their Google Font implementation. She feels that here private data has been exposed. The case is not yet over, but it shows that it might be a good idea to self-host google fonts...
@justinoneill28373 жыл бұрын
I'm trying to add a custom icon font library w/ this method (material design icons to be exact). it's acting a tad bit strange though. Would be cool to see another video on how Tailwind recommends doing this.
@ovuokeaghwotu23893 ай бұрын
How do make the imported custom font the global default font? Thank you.
@probelou3 жыл бұрын
If I have the one font with multiple weights and want to use the tw font-weight utility classes how do I declare that? E.g. class="font-fontName font-weight-normal" or class="font-fontName font-weight-bold". I tried this but the cascade wins so `fontName` uses 700 weight irrespective of the weight utility class. @font-face { font-family: "fontName"; font-weight: 400; src: url("../public/fonts/font-name-400.woff2") format("woff2"), url("../public/fonts/font-name-400.woff") format("woff"); } @font-face { font-family: "fontName"; font-weight: 700; src: url("../public/fonts/font-name-700.woff2") format("woff2"), url("../public/fonts/font-name-700.woff") format("woff"); }
@ICOReviewtoken Жыл бұрын
Hi bro. I have a custom font that I want to import locally but it doesn't accept it. Also if I want to give users the ability to choose their own fonts when using, for example users will set the font for different title tags and font base, can I do it in nextjs 13? Please give me solution. I use nextjs 13, taiwincss. Thank you
@mattd54193 жыл бұрын
how can we use variable fonts?
@DrHappybone3 жыл бұрын
Can't get local fonts to load at all.. just flat out refusing to do it. Using Vite, npm run dev for the server and tried using public file in root. No matter what I do, it's not loading the fonts
@rickdev19223 жыл бұрын
me too😢
@arianhossain96002 ай бұрын
what is the name of this font that in the VS Code????? if u know let me know
@TheKumarAshwin2 жыл бұрын
how to avoid expected behaviour issue, as my custome fonts loads after the default font?
@govindsaini80853 жыл бұрын
Hi I m facing the pb of display I want to show in lg screen of image and mobile devices I want to show hidden of image "hidden md:block " I used but doesn't work show this kind of pb how to solve if possible as soon as reply for this question
@momenabdelghafar77713 жыл бұрын
what is font-family in the text-editor
@HosamHasanMonir3 жыл бұрын
monolisa font
@anirudh17133 жыл бұрын
Its DankMono, its paid.
@modz97113 жыл бұрын
@@anirudh1713 yup it's dank mono..! Check the 'f' its unique ..!
@marcorieser3 жыл бұрын
I think it's MonoLisa, they released version 1.8 yesterday which adds a script variant that gives you a similar look like Dank Mono.
@modz97113 жыл бұрын
@@marcorieser will check it
@edanbenatar2 жыл бұрын
Would you have to define all the weight classes so that Tailwind behaves accordingly with the font weight utility classes?
@mike1101113 жыл бұрын
Please can you do a video explaining css layout for beginners
@abdullahialhassan37003 жыл бұрын
I have a question, while you are using the jit kit fo you need a css folder too
@jobsphil95533 жыл бұрын
I wish you provide html source together. I wonder how the regular / bold font applied to css.
@nbbhaskar32943 жыл бұрын
Either font-bold tailwind class can be added to your html element. Or in @font-face declaration in your css file, you can specify font-weight: 700 and point src to the bold font file, that should it.
@muskanbhatnagar75352 жыл бұрын
Hi, is there a possibility to conditionally add a font? I have a multitenant setup, and for different client UI's, we support client specific fonts. In client A's app, I only use client A's font. But embedding fonts this way downloads client B's font as well even though it is not used.
@YazinS3 жыл бұрын
Great video! I was hoping it would cover how to change the default body font? I don't see a class (e.g. font-body) that can be overridden?
@irving7653 Жыл бұрын
What are the font and theme you use?
@oliverye552 жыл бұрын
Amazing video! super direct and to the point!! love this.
@lawrencemotions87203 жыл бұрын
How to add fonts in next js.
@nozimjonjuraev2666 Жыл бұрын
can anyone tell me how to set up truetype font in project with tailwindcss?
@varun_y3 жыл бұрын
when using with nextjs and self hosted fonts , i had to put link in head tag as well.
@hmatpin3 жыл бұрын
Hi. Does anybody know how to include the css of a third party library like slick slider into a tailwind project?
@joshuarileymagic3 жыл бұрын
I maybe thinking too advanced or might not be performant but since the JIT compiler CDN is JS and you can use [ ] in classes, wouldn't it be easier if the CDN auto-imported the google font if you use say font-[Roboto] then it'll auto import the font as a link tag in header and dynamically create the css needed, just an idea anyway :) I'm starting to look more into customising Tailwind after using the defaults for a while along with custom css
@mychoppaeat Жыл бұрын
1:00 eyo!
@esdev3 жыл бұрын
Is it possible to use without tailwind config file , more preciously in new tailwind cli jit mode which doesn't require config file??
@simonswiss3 жыл бұрын
If you want a custom "font-${fontName}" utility class, you'll need a Tailwind config file. You can still use a custom font and set it in CSS on the HTML elements you want to target.
@aaymankhalid9997 Жыл бұрын
I need to know the vscode theme being used in this video🙃
@simonswiss Жыл бұрын
The theme is Night Owl, and the font is Dank Mono ✨
@Keteku.2 жыл бұрын
What font is he using in his code editor ? Any help here
@janascofield2 жыл бұрын
operator mono
@Keteku.2 жыл бұрын
@@janascofield Will check it out. Huge thanks
@guilhermeeduardomaffei12472 жыл бұрын
which font do you use in Visual Code ?
@janascofield2 жыл бұрын
operator mono
@JamisIcon3 жыл бұрын
Hi, thanks for the great tips, I'm kinda new to this, my font changed when I added it to the app.css file not the tailwind.config.js, I'm kind of wondering what happened :D
@christyjacob85513 жыл бұрын
I just googled for this yesterday!!
@kelas-frontend3 жыл бұрын
Yeah, me too 😁
@phonghoanggia91813 жыл бұрын
I just wanna know what font do u use in your text editor?
@alessandro20923 жыл бұрын
Dank Mono
@tomrowe21813 жыл бұрын
Would have liked a V2.2 example of this in the video! I had to work it out myself the other day 😅 Moving off CSS files was a game changer, but the docs are missing a lot of examples on how to customise certain things
@TailwindLabs3 жыл бұрын
This example was made in 2.2! The exact same technique has been working since v1 by the way, there is nothing different about adding custom fonts to Tailwind since version 2.2.
@tomrowe21813 жыл бұрын
@@TailwindLabs Oh I meant without CSS files! 😅 By defining font-faces in a custom plugin for the tailwind config
@sherifsaleh1113 жыл бұрын
What's the text editor font are you using 🙏?
@alessandro20923 жыл бұрын
Dank Mono
@en3rr Жыл бұрын
Thanks this helps a lot!
@The_Penny_Seventeens10 ай бұрын
Thank you my website is one step closer!
@bogdanlupu36793 жыл бұрын
From what Tailwindcss version does this work? Does it work in 2.0 or 2.2 onwards?
@wobsoriano3 жыл бұрын
Since v1
@simonswiss3 жыл бұрын
It was already working in v1, we just haven't provided many examples until now 👍
@bogdanlupu36793 жыл бұрын
@@simonswiss thanks. I am new on tailwind and i plan to use in a project that nas custom fonts. The codebase vad installed 2.0. That's why the question. Thanks again for the answer.
@OneBrokeBloke Жыл бұрын
And local fonts, but as utility classes? Thats what im looking for
@Ravi0207 Жыл бұрын
Anyone struggling with using the next font optimisation with tailwind - In _app file declare the font as a jsx style css variable. And use that variable in the tailwind config file
@CARUSAR213 жыл бұрын
So epic once again.
@ch3tankate4693 жыл бұрын
We want more such videos Plz reply this post if you want more
@cas44253 жыл бұрын
🔥🔥🔥
@oliverye552 жыл бұрын
Subscribed and liked!!
@BneiAnusim2 жыл бұрын
PRICELESS! Thanks 😉
@codeative3 жыл бұрын
just awesome
@lautaroriveiro2 жыл бұрын
Thanks again!
@adeema664 Жыл бұрын
very good video 🥰🥰
@waldothedev3 жыл бұрын
Haha, amazing...how do you say that again Wes? vit? veet? lol
@TheCrisisCall3 жыл бұрын
Really very good video! I'll start implementing the fonts this way. On the other hand, does anyone know how to include style that should be in regardless of whether their classes are in the HTML or not? It happens that I apply style to a carousel but it only exists when the page loads, so the purged css does not contain the style