#I am in the Learn CSS Variables for Free course. Question about the JavaScript.

4 messages · Page 1 of 1 (latest)

lilac junco
#

I am new to Scrimba and jumped into this course since I found it interesting. I loved segments 1 to 6. But when it got to segment 7, I found myself confused. Since I don't know Javascript yet, when they just started typing the JavaScript, I felt like .. where did this come from.

Question: Is there a course segment in Scrimba that would explain the JavaScript code that was used (since it wasn't really explained thoroughly in this CSS Variables segment). Is there a segment I can go to that would explain the "document.querySelector(':root') and other Javascript that was used (line by line and piece by piece):

var root = document.querySelector(':root');
var rootStyles = getComputedStyle(root);
var red = rootStyles.getPropertyValue('--red');
console.log('red: ', red);
root.style.setProperty('--red', 'green');

Then, when I was in segment 8, it mentioned that there was a link to the CSS Grid course in the "About" section of the screencast, but I don't know where the "About" section in the screencast can be found. Can someone explain? PS: I like that the CSS is being fully explained, but the JavaScript was not (since I am very new and needed more information).

Can someone advise me, .. I'd appreciate any help. I apologize for this very rudimentary question.

Thanks,
Gary

sacred perch
#

Hey you can learn the basics of JavaScript that will help you understand what you gave as example with this course [ https://scrimba.com/learn/learnjavascript ] - its part of the Career Path as well, but I get the feeling you want to go it your own direction? If I am wrong I apologise, and if you dont, the the career path is a great structured way to learn everything so you wont be confused and everything will be explained, it building on each module in it [ this is the path: https://scrimba.com/learn/frontend] and as for the CSS Grid course, here is the link to that too: https://scrimba.com/learn/cssgrid

Hope that helps. ❤️

#

Oh, as an added, to find the About in future, in the scrimba editor/scrim -- to the right of the cog there is an icon that looks like a hamburger menu (≡) -- clicking this will open a little menu where you can find the About section 6989_cat_smile

lilac junco
#

@sacred perch, Thanks!! I think I'll just go through the Career Path and hopefully that will fix me up. LOL I did go to the "About" area you mentioned, but I didn't see any link in there, which was why I asked about this. I thought maybe I'm in the wrong place.