I wasdoingsomethingelse, preparingforanothervideo, and I cameacrosssomethingthatgaveme a reallygoodreasontoregister a custompropertytopreventinheritance.
I wanttoshowyouwhatthatwasbecause I thinkit's oneofthethingswithregisteredcustompropertiesthatgoesundertheradar. Soyou'llseehere I have a containertypeseton a wholebunchofdifferentthings.
Becausewhenitgetsbigger, allof a suddenitgoestotwocolumnsandthisareaherealsogoestotwocolumns.
Butthisshouldeitherbezeroorthreecolumns, or I guessoneorthreecolumns. Sotohelpyouunderstandwhat's actuallyhappeningthere, becauseittookme a secondtounderstandwhatwasactuallygoingon, iswe'regonnachangetheoutlinethat's ontheseelementswhentheygettothetwocolumnworldhere.
Sothatcallcountoftwoisbeingpasseddownintothisothercontainer, which I don't wanttohappen. Butluckilynowwecanregistercustomproperties, andthisisinallbrowsersnow.
Andbydefault, thatistrue, butwecanswitchthatovertofalse. Thesyntaxhereissortofthetrickiestpart, and I wouldjustlookup a listforwhatyoumightwannaputforyoursyntax.
Inthiscase, it's a nice, simpleone.
Wecando a number.
Youhavecolor, youhavelength, youhavepercentage.
There's a wholebunchofstuffyoucanactuallyputinthere.
I'm alsogonnalinktoanarticlebyStephanieEcclesthatbreaksdown a lotofreallygoodusecasesforusingregisteredcustomproperties.
It's overonmoderncss.dev.
It's linkedinthedescription.
Really, reallygoodarticle.
Stronglyrecommendthatyougiveit a readifyouwannaknowmoreaboutregisteringcustompropertiesandsomeoftheusecasesyoumighthaveforthem. Now, onething I haven't donehereissaidwhatpropertythisisactuallyon.
Sotonameit, I justcomehere, andthatwasmycallcount, I thinkiswhat I calledit.
Sonow, if I didthatcorrectly, and I'm usingtherightnamethere, so I'm registeringmypropertycallcount, and I'm sayingit's a numberwithaninitialvalueofoneandinherits a false.
Andthisactually, I'vethoughtof a wholebunchofgoodusecasesthat I canusethisfornow, so I'm prettyexcitedaboutit. Andwiththat, I wouldliketothankmyenablersofawesome, Andrew, Philip, Simon, andTim, aswellasallofmypatronsandallmynewchannelmembers.
Andthere's somenewpatronstoo.
Thankyouallsoverymuchforsigningup.
Andofcourse, untilnexttime, don't forgettomakeyourcorneroftheinternetjust a littlebitmoreawesome.
Hello, myfront-endfriends.
Subtitles and vocabulary
Click the word to look it upClick the word to find further inforamtion about it