Andso, forme, as a designeron a developerhasworkedontheWebforactually 25 years, myWebcurryisprobablyolderthanhalfthepeoplehere.
Butthatthathasledmetobeabletoparticipatemorethan I everhavebeforejustbyspeakingupjustbygoingin, commentingonissuesandtryingthingsout, providingsomeusecases.
And I'llshowyousomeofthosethingstoday.
Really, mostpeoplejustknowmeas a walkerofthesetwo.
Um, sothey'regoingtocomebackandhelpmekindofexplain a couplethings, butso I spentmostofmytimeworkingontypeandtypographyanddesignsystemsandforbrowservendorsandthatsortofthing, writingcontentaboutit, tryingtoeducatepeopleaboutit.
But I'vehadpeopleinAustraliaaskedmefirsthowTristan's doing.
Sowhenthisquotecameacross, I waslikethedaybefore I wasgivingthisthefirstversionofthistalkforthefirsttime, andand I hadtoworkthisinbecause I thinkNina's notionoffrictionindesign, whatcreatesthatinterfacebetweenwhat I putonscreenandwhatyouread.
That's whatmakesitmemorable.
Andsometimesyouwantmorefriction.
Sometimesyouwantless.
Buttypeisthewaywecanmodulatethat.
I thinkthat's reallyfascinating.
Sowhat I wanttolookatisactuallycombiningseveraldifferentCSStechniquestocreatemoreinterestingandfluidtypography.
I hopeit's somethingthatyou'veallatleastheardabout.
Butifnot, I'm gonnaexplain a littlebitmoreaboutwhattheyarein a minute.
Solookingatwhatwehaveunscreened, I thoughttheOdysseymightbe a goodwaytotalkaboutthewayourjourneyontheWebhasevolved, and I wantedtotryandpresentitin a slightlydifferentway.
Sowehave a heading, andinsteadofassigningitanexplicitcolor.
Wecouldsignit a variableforthatcolor, sowemightchangeitlateron.
And I thinkthatwe'llhavesomeinterestingusecasesforthat.
Wemightalsowanttodo a calculationonthesizesothatwecouldthenchangethatbasesideslateronaswestarttoscaleitondifferentscreensizes.
Sowe'venowdonethingslikechangedthesize, andthatactuallyalteredtheflowofthetext a littlebit.
Sowemightwantto.
Actually, a signofvariabletothewaitiswell, soassizechanges, wemightimpactthat.
Sohere's wherethevariablefontscomein.
Wehavethatsingleassetthatwecanthenusein a greatervarietyofways, andthisisactuallywhere I wanttopauseforjust a secondandbringuptheideaaboutwhenwereadadviceaboutthingswedoontheWeb.
And I knowthat's a lotofsomebodywho's GregfromtheEdgeEdgeteamlastnightsaid, Areyougonnaputthatreallystupidlylongformulauponthescreenthat I saidYes, yes, I ammultipletimes, but I'llexplainit.
Sothisiskindofwhat's goingon.
Andthisisbasedon a techniquethatTimBrownwroteabout a whileagocalledCSSLocks.
Nowsomeofyouhaveprobablyplayedaround a viewportwithunitstosizetext, andthat's reallyinteresting, andithelpstosizetextbasedonthesidesofthewindow.
Youcanassign a minimumandmaximumsizeandthentieittodifferentbreakpointssothatitwillgetnosmallerwhenit's on a verysmallscreenandnobiggerwhenit's on a verylargescreen, anditgivesyou a littlebitmorecontrolwithouthavingtoworryabouteverythinginthemiddlesoeffectivelyyou'restillusingbreakpoints, butonlyatthelowendinhighendofwhereyouwantittostartandstopscaling.
Sowestarttoreplacethesevaluesintheformulagets a littlebitsimpler, andthisisaboutthepointwhere I throwmyhandsupandwalkawaybecausebrowsersorbetterenoughthan I am.
I didn't reallytakeanycollegemath, either, sothat Z thisisasfaras I go.
Butbrowsers a reallygoodatit, andthat's fine, andyoudon't everhavetorewriteit.
Wehavefairlychoppylinelengthswhenyouhavethetextsizesetat a goodreadable 100% size.
Soratherthanmakethebodytextsmaller, wecouldmakeit a tinybitnarrowerifyouhave a withaxisandthatwillfitmorecharactersperlineandgiveyou a littlebitmore, evenreadingexperiencewithoutreallysacrificingtheledgeability.
So a singlefontFile 84 k replaces 18 separatefilestoprint.
Createthisbeautifulrangeoftypography.
Now I sayBeautifulrange.
I'm notsayingbeautifultypography.
I happentolikeit, but I don't wanttoimplythatthatjudgmentisabsolute.
Andsothatalsomovesinscalesreallynicely.
Sothisisusing a lotofthesameideasontheslightlyearlieritoration.
Butwhatdoesn't havethewit?
Butitdoescreateaninterestinglayoutandsolutionbasedappropriatelyforthescreensizethatit's on.
ThisisanotherquotefromTimBrown, because I thinkthisisreallyimportant, andthisis a themethat I'veseenemergingat a bunchofeventsindifferenttalksthisyear, whereweneedtorememberthatwe'renotdictatingtheexperiencetotheuser.
SowhynotuseCSSand a littlebitofJavascriptsAllincludeeverybodyfromTomorrowandSundayaswellthatwecanimprovethisexperiencewith a fewsimplethingstogivepeoplethechoiceabouthowtheywanttotakeinthiscontent.
Sooneofthethingsthathasbecomeprettypopularistheideaofusinglightanddarkmode, soit's builtinto a lotofdifferentoperatingsystemsnow.
It's, oddlyenough, notavailableinIOS, and I wasreallykindofsurprisedaboutthat.
Ifyouhave a flagset, it's workinginmybrowseranyway.
Soif I wantedtojustpopovertomysystempreferences, Andi, gobackhere.
It's undergeneral.
Andif I justselectdarkmode, I didn't changeanythinginthecode.
I justhave a fewthingsinthemediaquerysothatiftheuserhassetthatpreference, I caninvert a coupleofthings, andit's reallyeasytodobasedontheabsenceorpresenceofthesevariables.
Soinsidethemediaqueryherepreferscolorschemedark.
Then I'llhavetodoisreplace a coupleofdifferentvaluesforthosevariables, anditjustinvertsthewholecolorpalette.
Andasanexperiment, I addedthistomyownwebsitelastweekandtookmeabout 20 minutestogothroughandfindalltheplaceswhere I neededtoswapoutthosevariables.
Soit's actuallyit's kindofincrediblyeasythingtodo, and I gobackhere.
What I wanttodoisactually I cheated a littlebit.
I have a classonhereiswell, butwatchwhathappenswhen I enablethedarkmode.
So a coupleofsmalltweakstothetypographyusingbasicCSSontheonthevariableaxiscreatesthatbetter, moretailoredreadingexperienceinthatinvertedlightmode, whichforsomepeopleisthedifferencebetweenbeingabletousethecomputerandnotsoitreallydoesbehooveustotryandmakesurethesethingsareavailable.
Wecanstillcreate a slightlymorereadableexperience.
We'llgobackandforth a littlebit.
Thereyoucansee I'm doingthesamekindofthing, likeincreasingthegrade, openinguptheletterspacingjust a littlebit.
Itcreates a morelegibleexperienceforsomeonethatthatneedsthatextralittletouch.
Wecouldalsoplay a roundoffontsize.
Soagainweaken.
Inthiscase, all I hadtodoisredefinethescalingvalues, thelowinthehighend, andtheneverythingelsekindofmovesalongwithit.
Wecanalsodothingslikeaddresscrowding.
Crowdingis a particularsubset.
It's a conditionthat a subsetofpeoplethathavedyslexiasufferfromandactuallylearnedaboutthisfrom, um, KevinLarsonfromMicrosoftAdvancedReadingGroupdid a reallygreattalkaboutthisresearch, andwhattheyfoundwasthatinpeoplewhosufferfromcrowdingandit's it's noteverybodywithdyslexia, it's a subset.
Well, ifwecouldactuallyjustput a littlepanelofftothesideonourwebsite, andallitdoesistogglesomeclassesonandoffthatwilltriggerthoselittlebitsofCSSweakened, thenagainputitinthehandsoftheuser, allowthemtocontrolthatexperience.
Itdoesn't takemuchtimeforus.
Thenetcostin a projectiszero.
I'm notkidding.
I mean, like, thisis a tinyamountofefforttoputin a crossthescopeofthewholeprojectthatwillthenmakethedifferencebetween I canusethissiteor I needtogosomewhereelse.
Andwewantpeopletobeabletouseoursights.
So I thinkit's reallyimportantthatwekeepthatsortofthinginmind.
Andtheotherthingthatwemightdoagain, becausethisis a lotofefforttocreategreattypography.
Wewanttobeabletoreusethiseffortasmuchasaswecanweakened, thenextendit a littlebitmoretomakethewholesystemitselfseem a ball, sowecouldactuallyusedthisstuffoverandoveronotherprojectsbyusing a variableforthefontstackitself.
Andthatmightbebyjustadding a fewmorevariablesthataretiedtothefontstackthatweenablewhichoneisprimaryandthentiethingstoscreensize, lightmode, alldifferentkindsofthingsthatwemightbeabletodo.
Soyouget a tremendousamountoutofthat, and I justwanttoshow I knowotherpeoplehavebeenkindofcarryingonabouttheFirefoxdeaftools.
But, man, theyaresocool.
Sooneofthethingsthat I knowyou'renotgonnabeabletoreadthatThat's okay, thefrontpanel.
So I'm gonnaactuallygetoutofthismodesoyoucanactuallyseeitonscreenhere.
Soif I acceptmyfullscreenonDhe, inspectthisagain.
What I wanttoshowyouis I haveselectedthatfirstlineoftextandIfyoulookatthefontpaneloverhere, you'llseethatitshowsyouwhatfonthasbeenselectedandwhat's what's enabledthere.
Itgivesyouthebasicsofsizeandlineheightandwhetherornotithas a talentsornot.
Sothat's myplugforFirefoxoftoolsandand I willDoyouwanttosayoutloudthatpeoplefrombothChromeandEJteamhaveapproachedmeandhadconversationswithmethisweekaboutwantingtoimprovethesethingsinotherbrowsersaswell.
Anddon't worry, I'vegot a linkto a noticedpagethathasallofthisstuffonitwithtonsoflinks, andresourceissoyou'lleasilybeabletokindofcheckallofthisstuffout.
Butthisdemoisliveontheweb.
Sothisisreallystuffthat I'm showingyouandwehavetheabilitytotake a look.