The place you start is by building LOTS of smaller applications. Trying to build a CRM system is like saying "I want to fly a rocket to the moon" as your first flight ever. It is really complicated.
Is it possible to change the variable dynamically using JavaScript? I’m thinking like what if you provided a control on your website to change the color and the user change the color and you wanted it to go in your style variable so it could affect the whole site.
Yep, root is a pseudo-class, which means it effectively makes the variables into global variables. And yes, they can cascade like anything else in CSS, so you can define them at any level or re-define them at any level. There are a lot of things like this in CSS3 that people aren't aware of. Same with HTML5. That's why I spent so much time in the Web Development Mastercourse covering topics like this. HTML and CSS have changed a lot in the past few years.
I'm wondering if there's a tool that would convert SASS/SCSS variables into CSS ones for me, so that I could leverage static analysis on SASS variables yet have the flexibility of dynamically modifying CSS variables using JavaScript.
What can you do with an SCSS variable that CSS variables don’t provide? You could even mix the two if needed but I’ve never seen the use case for that.
Thank you Tim.
Tim how to start CRM systems.
The place you start is by building LOTS of smaller applications. Trying to build a CRM system is like saying "I want to fly a rocket to the moon" as your first flight ever. It is really complicated.
This is awesome Im glad they added this
I’m glad you like them.
Thank you Tim.
I always learn something new from your videos.
Glad to hear it.
Nice. What about storing in a C# string and change at run time in a Blazor Razor page. Can we do this?
I don't know that you could do this. However, you could apply classes that would essentially do the same thing if you want.
Thanks Master, your way of teaching is the best
You are welcome.
It wasn't directly mentioned, but I am guessing you can put all kinds of variable values, let that be a color, font, size, or other var(--variable)?
Yep.
Great video, how did you get VScode and your web browswer to work in sync?
I use a plug-in called Live Server.
Is it possible to change the variable dynamically using JavaScript? I’m thinking like what if you provided a control on your website to change the color and the user change the color and you wanted it to go in your style variable so it could affect the whole site.
Yes, you can do that.
Excellent info. Nice to see you using VS Code.
Thanks!
Great Tim. Learn something new, Thanks you!
You are welcome.
":root" is a css keyword? Can I have other css variable sections? maybe per page or something?
Yep, root is a pseudo-class, which means it effectively makes the variables into global variables. And yes, they can cascade like anything else in CSS, so you can define them at any level or re-define them at any level.
There are a lot of things like this in CSS3 that people aren't aware of. Same with HTML5. That's why I spent so much time in the Web Development Mastercourse covering topics like this. HTML and CSS have changed a lot in the past few years.
I'm wondering if there's a tool that would convert SASS/SCSS variables into CSS ones for me, so that I could leverage static analysis on SASS variables yet have the flexibility of dynamically modifying CSS variables using JavaScript.
What can you do with an SCSS variable that CSS variables don’t provide? You could even mix the two if needed but I’ve never seen the use case for that.
Awesome!
Thanks!
Nice!
Thanks!
Is there any loops available?
I would encourage you not to treat CSS like a programming language. It is a styling language.
Please use less sass in video titles.
Thanks for the video, a nifty trick i will use.
You are welcome. And I’m assuming the SASS comment is a joke.
hmm you are doing css now 😶
Yep. I cover the supporting technologies around C# and the web is a big one.
He does it all 😁
First time I heard of variables in CSS