All language subtitles for 5. Scoped CSS Files3

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French Download
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:01,260 --> 00:00:01,630 All right. 2 00:00:01,650 --> 00:00:05,080 Let's start to add in some sea assets to limit the width of this card. 3 00:00:05,100 --> 00:00:10,230 Now we've already seen once the ISIS file inside of our code editor that was inside the S.R. sea directory 4 00:00:10,320 --> 00:00:14,640 we saw the styles Nazi SS file and we read that comment at the top. 5 00:00:14,670 --> 00:00:18,480 It said something like you can add global styles to this file. 6 00:00:18,480 --> 00:00:23,550 The term here global styles means that we should add sea assets inside of here that we want to be applied 7 00:00:23,550 --> 00:00:25,630 to our entire project. 8 00:00:25,680 --> 00:00:31,440 Like every last single element inside of our project right now we are trying to add in some styling 9 00:00:31,650 --> 00:00:36,810 that's going to affect specifically this card thing that we are displaying so we're not really trying 10 00:00:36,810 --> 00:00:38,990 to add in some global styling right now. 11 00:00:39,000 --> 00:00:44,760 Instead we want to affect one element that is created inside of specifically that app component. 12 00:00:44,770 --> 00:00:51,100 Each team will file but turns out that with angular we really have two different types of CFS files 13 00:00:51,210 --> 00:00:57,760 to different places to put any custom CSX we want to write the quick diagram to explain these two different 14 00:00:57,760 --> 00:01:01,020 types of files now in the left hand side. 15 00:01:01,090 --> 00:01:05,530 I'm showing some kind of imaginary application when this imaginary application. 16 00:01:05,650 --> 00:01:09,440 You can kind of picture that maybe there are different parts of the screen that have some different 17 00:01:09,440 --> 00:01:11,330 content inside them. 18 00:01:11,330 --> 00:01:16,160 Everything inside this gray box right here might be created with some H smell coming out of the app 19 00:01:16,460 --> 00:01:22,550 component HDL file and then maybe all these other regions are created by some other thing. 20 00:01:22,640 --> 00:01:24,530 In this case I'm calling it a component. 21 00:01:24,590 --> 00:01:28,670 We'll discuss exactly what a component means in just a moment but we're essentially saying here these 22 00:01:28,730 --> 00:01:32,780 other boxes are being created by something other than the app component. 23 00:01:32,780 --> 00:01:36,430 Each team will file now inside of our project. 24 00:01:36,450 --> 00:01:42,000 If we flip back over really quickly and open up your app directory you'll notice inside there there 25 00:01:42,000 --> 00:01:47,340 is a app component dots ISIS file so what is that other file about. 26 00:01:47,380 --> 00:01:52,600 Well these styles don't see SS file just like we saw inside that comment contains CSX that is going 27 00:01:52,600 --> 00:01:56,450 to apply to every last element inside of our application. 28 00:01:56,470 --> 00:02:02,340 So for example if we want to style every single button element every div every table every each one 29 00:02:02,750 --> 00:02:08,170 you would add that styling to styles Nazi SS and so anything we put inside there would affect content 30 00:02:08,230 --> 00:02:09,560 in that area. 31 00:02:09,730 --> 00:02:17,830 And over here and over down in here and so on you get the idea if we ever want to style anything that 32 00:02:17,830 --> 00:02:24,270 is created by some specific HMO file like our app component HMO file we are always going to place that's 33 00:02:24,270 --> 00:02:28,630 the SS inside of the similarly named CSX file. 34 00:02:28,630 --> 00:02:34,810 So because we want to style some HCM El that was created by app component dot HCM El we're going to 35 00:02:34,810 --> 00:02:37,680 place the styling for that in app components. 36 00:02:37,700 --> 00:02:43,900 SS Now it might seem like this is just like an organization thing like Hey in order to manage CSX on 37 00:02:43,900 --> 00:02:50,530 large projects let's just come in a pair are CSX files with the H team l let's not quite it. 38 00:02:50,610 --> 00:02:55,900 You see angular has a little bit of magic built into it as you're going to see very quickly it turns 39 00:02:55,900 --> 00:03:03,700 out that any CSX we put inside this out component dots the SS file can only affect the styling of elements 40 00:03:03,820 --> 00:03:08,120 that were created inside of app component H2 UML. 41 00:03:08,140 --> 00:03:12,750 In other words we can not possibly in any way shape or form right. 42 00:03:12,760 --> 00:03:18,400 Any styling inside of this file that would affect any elements created by other things inside of our 43 00:03:18,400 --> 00:03:19,730 application. 44 00:03:19,730 --> 00:03:25,780 So in other words app component C Ss can not contain styling affecting these other regions. 45 00:03:25,810 --> 00:03:30,040 Now this is 100 percent contrary to how normal CSX works in the browser. 46 00:03:30,040 --> 00:03:36,250 Remember CSX stands for a cascading style sheet essentially means that any styling we write is going 47 00:03:36,250 --> 00:03:38,900 to affect all the elements throughout our application. 48 00:03:39,080 --> 00:03:43,900 The angular has a little bit of trickery and like I said a little bit of magic to make sure that CSX 49 00:03:43,900 --> 00:03:50,270 that gets placed inside of here only affects content created by its accompanying H2 mail file. 50 00:03:50,340 --> 00:03:55,480 Now that I've given you a exhaustive verbal description let's actually test all this stuff out. 51 00:03:55,640 --> 00:04:01,030 It's going to go back over to my editor and I'm going to find that app components ISIS file again that 52 00:04:01,030 --> 00:04:03,650 is inside the app directory inside of here. 53 00:04:03,670 --> 00:04:07,960 We can only affect elements created inside of app component each team out. 54 00:04:07,960 --> 00:04:10,770 Let me prove that to you inside of app components. 55 00:04:10,770 --> 00:04:11,410 Yes. 56 00:04:11,440 --> 00:04:16,080 I'm going to try to style the body element on the body element. 57 00:04:16,090 --> 00:04:24,130 I'm going to try to apply a border of 10 picks solid red and I'll even put importance on tier on here 58 00:04:24,520 --> 00:04:29,850 just to make sure like 100 percent we are really trying to add that styling in I'm going to save this 59 00:04:29,850 --> 00:04:30,750 file. 60 00:04:30,900 --> 00:04:33,300 I'll then look back over my application. 61 00:04:33,300 --> 00:04:33,840 We're going to see. 62 00:04:33,840 --> 00:04:37,200 There is no border whatsoever visible inside of here. 63 00:04:37,230 --> 00:04:38,900 No border around the outside edge. 64 00:04:39,420 --> 00:04:47,530 If we open up our element inspected and click on elements you can find the body element right there 65 00:04:47,740 --> 00:04:50,400 and click it and you're going to see inside the styling panel. 66 00:04:50,410 --> 00:04:54,460 There is no reference whatsoever to that rule that we just added in. 67 00:04:54,550 --> 00:05:00,580 So again total magic on the part of angular it is not going to let you affect any element outside of 68 00:05:00,580 --> 00:05:07,390 elements that are created by the app component HDL file so now with that mind going to delete that rule. 69 00:05:07,530 --> 00:05:13,490 We're going to try to add in the actual CSI as we need to limit the width of that card element back 70 00:05:13,490 --> 00:05:15,380 inside of app card H.M.. 71 00:05:15,420 --> 00:05:19,870 You'll notice that the top element right here has a class of card. 72 00:05:19,950 --> 00:05:24,990 Let's try to just write a selector that's going to get that element right there and then apply a width 73 00:05:25,230 --> 00:05:31,280 property to it or with real excuse me working with the SS now inside of app components. 74 00:05:31,280 --> 00:05:33,600 Yes yes I'll do Dot card. 75 00:05:33,740 --> 00:05:42,350 I'll say width of 350 pix but now this is going to try to find some element inside of our accompanying 76 00:05:42,360 --> 00:05:43,350 H.M. file. 77 00:05:43,370 --> 00:05:48,750 It's going to find that thing right there and apply the width rule to it going to save but these files 78 00:05:48,990 --> 00:05:56,010 look back over now I'll see that my card is of a very reasonable size down to 350 pixels and you'll 79 00:05:56,010 --> 00:05:58,090 notice that I'm at 100 percent zoom right now. 80 00:05:58,200 --> 00:06:02,020 So you should see something very similar on your screen as well OK. 81 00:06:02,070 --> 00:06:04,740 That's the basics of CFS files in angular. 82 00:06:04,740 --> 00:06:07,680 Remember we've got these two different types of CFS files. 83 00:06:07,710 --> 00:06:08,940 One is can have global styles. 84 00:06:08,940 --> 00:06:12,600 One is gonna have stuff specific for our different components. 85 00:06:12,650 --> 00:06:14,130 Now we've got all the stunning fixed up. 86 00:06:14,300 --> 00:06:16,860 Well let's continue with their application in just a moment. 9418

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.