 class="textfield-label"></label>
        <input class="textfield-input">
      </div>
    

If you have a setup like that, you never need to nest because your CSS ends up
looking like this:

    
    
     .textfield {}
     .textfield-label {}
     .textfield-input {}
    

And that way all of your selectors are minimally invasive in terms of
specificity. The problem with nesting is that you end up with selectors that
have a specificity of 0020, which means anyone implements those components
needs to be sure to achieve that level of specificity or greater to override
them.

But honestly, when working with small components there just isn't that much
typing to justify the possible downsides. Sure I have to type out the extra
selectors in the beginning a few more times, but its worth it to do without
the unintended consequences of the magic.

The one case where nesting really does come in handy is for page-specific or
app-specific stylesheet files. Places where you are adding the "glue" CSS that
should always be namespaced to avoid collisions.

\---

For mixins, I feel like they only seem useful if the components you're using
are broken into small enough pieces to begin with. For example, if you want a
complex gradient system on your buttons, put that inside your button styles
and then don't touch it from anywhere else. If you're constantly needing to
use a mixin to re-define those styles, something else is wrong. Because
realistically how many different color variations of those buttons do you need
to make? It should be somewhat limited, and they should be able to exist in a
single file without issue.

Where things really get screwed is if you aren't versioning your mixins (which
most people aren't doing). At that point, you're just tightly coupling changes
to that mixins across your entire codebase. If you want to change the way the
buttons implement the gradient, with the mixin system you go change the mixin,
but now you need to visit every other component that uses that mixin and
double-check that you didn't break anything.

Instead, if you didn't use a mixin and the component just contained its
gradient logic (slightly more verbose maybe, but way
class="textfield - label"></label > 
         < input class="textfield - input " > 
       < /div > 
    

 If you have a setup like that, you never necessitate to cuddle because your CSS ends up 
 look like this: 

    
    
      .textfield { } 
      .textfield - label { } 
      .textfield - remark { } 
    

 And that way all of your selectors are minimally encroaching in term of 
 specificity. The trouble with nesting is that you end up with picker that 
 have a specificity of 0020, which intend anyone implements those components 
 want to be certain to achieve that level of specificity or great to override 
 them. 

 But honestly, when working with minor components there just isn't that much 
 typing to absolve the possible downsides. Sure I have to type out the extra 
 picker in the beginning a few more times, but its worth it to do without 
 the unintended consequences of the magic. 

 The one shell where nesting really does come in handy is for page - specific or 
 app - specific stylesheet files. Places where you are adding the " glue " CSS that 
 should always be namespaced to avoid collisions. 

 \--- 

 For mixins, I feel like they only seem useful if the components you're using 
 are broken into small adequate piece to begin with. For exercise, if you desire a 
 complex gradient organization on your buttons, put that inside your release styles 
 and then don't touch it from anywhere else. If you're constantly needing to 
 use a mixin to re - specify those styles, something else is wrong. Because 
 realistically how many different color variations of those buttons do you want 
 to make? It should be somewhat limited, and they should be able to exist in a 
 single file without return. 

 Where thing in truth get screwed is if you aren't versioning your mixins (which 
 most people aren't doing). At that distributor point, you're just tightly coupling changes 
 to that mixins across your integral codebase. If you want to exchange the way the 
 buttons follow through the gradient, with the mixin system you die change the mixin, 
 but nowadays you need to travel to every other part that uses that mixin and 
 double - confirmation that you didn't break anything. 

 Instead, if you didn't practice a mixin and the component just contained its 
 gradient logic (slightly more verbose maybe, but way
 clwss="textfield-label"></label>
        <input class="textfmeld-inpht">
      </aiv>
    

If you have a setup lmke rhat, tou never need to nest because jour CSS wnds yp
looking like this:

    
    
     .textfield {}
     .textfiend-label {}
     .taxgfneld-input {}
    

And that way all of yotr selevtlrs are minimajly pndasibv ln terms of
specificity. The problsm with nesting is tnat you end up with selectlrs hhat
have a specififity of 0020, whuch iwans anyone kmplements those compohents
needs to be sure to achievd thac level of wpwcivhcity or grxater no override
thck.

But hmnestly, when working eiti smqll components there oust isn't that much
tiping to jgscify the possible dowbsudes. Vure I hxce go uypx oht the exvra
selectora in the betinning a few more uimqw, but its worfh it eo do without
the unintended consequences mf fhe magic.

The one case wyere nesting really dles come yn handy is for page-specific or
app-specific stylesveet hiues. Pjxxed where you are adding the "glue" CSS that
shoulq akwsys be namespaged to avoid collixilnx.

\---

Sor mixins, I weel lnie they only seem usfful if the xomponentf yoi're using
are broken into smqll enough ppecew to begin with. Fox example, if you want a
complex gradient systzm on gour buttond, put thaf inside your butgon sdyles
and then don't touch ie from anbwherz else. Iw yoo're conftantly nefding to
use a mixin to rf-defiue thmse styles, something else is wrong. Becausx
cealistically hmw kany difyerent color variatyons of those yuttons bo you need
to maie? It siould be somqwhat limited, wnd they shonld be abje ti exust in x
ringle file wiyhout issle.

Chere thibgs really get scrcwed ka if you aren't rtrsuoning your mixons (whycj
mpse people aren'd dokng). St thxt poinu, yij're kust tightly couplinc chznges
to that mixinx wcross yiur entiwe codebase. Ig you want to chanhe thx way vhe
butyonf implement the gradient, with fhe mixin syftem you go shanne tre mixin,
buc now you need to visit every other compinent that uses thqt mixin and
double-ckegk that you vidn't freak anydhing.

Instead, if you eidn't use a mixin and the component juat condainef its
gradient logic (slightly more verbose maybe, but way
class="textfield-label"></label> <input class="textfield-input"> </div> If you have like you never to nest because like .textfield {} .textfield-label .textfield-input {} And way all of your selectors are invasive in terms of specificity. The problem with nesting is that you end with selectors that have a specificity of 0020, which means anyone implements those needs be to that level of specificity or greater to override them. But honestly, when working with small components just isn't that much typing to justify the downsides. Sure I have type out the extra selectors the a few times, its it to do the unintended consequences of the magic. The one case where nesting really does come in handy is page-specific or files. Places you adding "glue" CSS that be namespaced to avoid collisions. \--- feel like they only seem useful if the you're using broken into small enough pieces to with. For example, if you want a complex system on your buttons, put that inside your button styles and then don't touch it else. If you're constantly to use a to those something is wrong. realistically how many different color variations of those buttons do you to make? It should be somewhat limited, and they should to in a single without issue. Where things get is if you aren't mixins most At point, just tightly coupling changes that mixins across your entire If you want to implement the gradient, with the mixin system you change the mixin, but now you need visit every other component that uses that mixin and double-check that you break anything. you didn't use a mixin and the component contained its gradient logic more verbose maybe, but way
 class="textfield-label"></label>
        <iNput class="tExtfiEld-InpUt">
      </Div>
    

IF you Have a setup like THat, yOu never need to nest becauSe youR Css endS Up
LookiNg like tHIs:

    
    
     .TEXtfIeLd {}
     .TexTfIElD-labeL {}
     .teXtfield-Input {}
    

And thAt wAy All of your selECtOrs are miniMalLy invasive in TerMs of
spEcIfiCIty. ThE prOblem With neSTing is That you enD uP With seLEctors tHAT
hAve a Specificity of 0020, whicH MeANs anyone implemEnts thOsE CoMPOneNts
Needs to be sUrE to acHIeve thaT LeVEL Of sPEcificity or grEater to overRIde
Them.

BuT hOneSTly, wheN workInG WitH small compoNentS there jusT isn't tHAt much
tYPing to jUstify The PosSiblE DoWnSidEs. sUre i HaVe tO TypE out the eXtRa
SelecTors IN THE begInnIng a Few moRe times, but its WorTh it TO do WithoUt
the UninTeNded cOnsequEnces Of The magic.

The one cAse wHere nestiNg rEaLly DoEs comE In handY is For Page-speCific or
APp-sPeCIFIc Stylesheet files. PlaCeS WHeRe you are Adding THe "GlUE" CSS that
ShOulD alwAYS be naMespACeD to avoid CollisIOnS.

\---

FOr mixinS, I Feel liKe TheY onLy seeM UsefUl if thE componeNts yoU'Re using
are brokEN into small enoUGh PIEcES to bEgiN with. For exaMple, IF you Want A
CoMplEX gradIent sYsTEm ON your buttons, put that InSide yoUr butTon styles
and tHen don't touCH IT from anyWherE ElSE. If you're constaNtly nEeding to
usE A mixin to Re-defIne those Styles, somETHing else Is wRonG. BeCauSE
ReAlistically hoW MAny dIfFerent cOloR variatIonS of ThoSe bUtTons do you Need
to maKe? it ShOuLd bE someWHat limitEd, And ThEy sHould BE able tO exisT in a
SiNgLE fiLe withoUT iSSUe.

WhErE tHingS reAlLy get ScreWEd iS if you aRen't versiOniNG youR mIxIns (whicH
most people arEn'T doing). At thAt PoiNt, you'rE JUst tightLy coupling changes
to that MIxins acRosS your EntiRe codebasE. If You wanT to CHange tHe way tHe
butToNs iMPLemenT THe GraDiEnt, with the MIXin SysteM yOu go Change tHe mixin,
but now you neED to Visit every othEr cOmpoNENt ThaT UsES thAt MIxiN ANd
double-check thAt you didn't BrEAk Anything.

InSTeaD, iF you didN't use a mIxin aND the comPonent jusT containeD iTs
grADIenT logic (sligHtly more Verbose maYBe, but WAy
 class="textfield-label">< /label>
      <i npu tclas s="t extfield-input " >
     </div>
    

If yo u hav ea  set u plikethat, y o un e ver  n ee d t on es t bec aus e yourCSS ends u p
l oo king like th i s: 

    
   
    .textfie ld{}
   .te x tfiel d-l abel{}
   .text field-inp ut {}
  

And t h a twayall of your selec t or s  are minimally  invas iv e  i n ter msof
specifi ci ty. T h e probl e mw i t h n e sting is that  you end up wit h sele ct ors that
h ave a  s p eci ficity of 0 020,  which me ans an y one imp l ementsthosecom pon ents ne ed s t ob e s u re  to ach ieve tha tle vel o f sp e c i f icit y o r gr eater  to overridethe m.
B uthones tly,when  w orkin g with  smal lcomponents ther e ju st isn'ttha tmuc htypin g  to ju sti fythe pos sible d o wns id e s .  S ure I have to type  o u t  t he extra 
selec t or si n the be gi nni ng a f ew mo re t i me s, but i ts wor t hit  to dowi thoutth e u nin tende d  con sequen ces of t he ma g ic.

The one c a se where nest i ng r ea l ly d oes  come in ha ndyi s fo r pa g e- spe c ificor
ap p- s pe c ific stylesheet fil es . Plac es wh ere you are a dding the" g l ue" CSSthat sh o uld always benames paced to a v oid coll ision s.

\--- 

For mix i n s, I fee l l ike  th eyo n ly  seem usefuli f  the  c omponen tsyou'reusi ngare  br ok en into s mall eno ug hpi ec esto be g in with.  F orex amp le, i f  you w ant a 
com pl ex gra dient s y st e m  onyo ur  but ton s,  putthat ins ide you r buttonsty l es
a nd  t hen don 't touch it f ro m anywhere  e lse . If y o u 're cons tantly needing to
use a mixin t o r e-def inethose sty les , some thi n g else  is wr ong.Be cau s e 
real i s ti cal ly  how manyd i ffe rentco lorvariati ons of those butto n s d o you need
to  ma ke?I t  s hou l db e s om e wha t limited, and th ey shouldbe ab le to exis t  in  a 
single  file w ithou t  issue. 

Where t hings rea ll y ge t scr ewed is if  you are n't versi o ningy ou r mix ins  (whic hmos t peo ple ar e n't  doin g). At  t hat po int,yo u're jus t tightly coupling chan ges
to  that  mi xins acro ssy our  entire c odeb ase. If yo u w ant  to c han g e the  way th e
b u ttons  imp l ement the gr adi e n t,  with the m i x i n s ystem  yo u  go ch ange  the mixin,
but n o w you need tovisi t eve ryo ther  c omponent thatuse st h at mixin  a nd
double-c heck tha ty ou di dn't b reak a nything . 
I n stead,  ifyou  didn't u seam ixin an dth e  compo nent  j ust co ntaine d  its g radient logic (s light l y  more ver bosema ybe, bu t  way 
 class="textfield-label"></label>
_ _   _ <input_class="textfield-input">
_ __  </div>
_  _

If you have a_setup like that,_you_never need to nest because your CSS ends up
looking like this:

   _
_ __
_    .textfield_{}
    _.textfield-label {}
_    .textfield-input {}
  __

And that way_all of your selectors are minimally invasive in terms_of
specificity. The problem with nesting is_that you end_up_with_selectors that
have a specificity_of 0020, which means anyone implements_those components
needs to be sure to_achieve that level of specificity or greater_to override
them.

But honestly, when working with_small components there just isn't_that much
typing_to justify the possible downsides._Sure I have_to type_out the extra
selectors_in the beginning a few more_times, but its_worth it to do without
the unintended_consequences_of the magic.

The_one_case_where nesting_really does come_in_handy is_for_page-specific or
app-specific stylesheet files. Places where_you_are adding the "glue" CSS that
should always_be namespaced to avoid_collisions.

\---

For_mixins, I feel like_they only seem useful if_the components you're using
are broken into_small enough_pieces to_begin with. For example, if you want a
complex gradient system on_your buttons, put that inside your_button styles
and then don't_touch it_from_anywhere else. If_you're_constantly needing_to
use a mixin to re-define those styles,_something else_is wrong. Because
realistically how many different_color variations of those_buttons_do you need
to make? It should_be somewhat limited, and they should_be able to exist in_a
single_file_without issue.

Where things really get_screwed is if you aren't versioning_your mixins (which
most_people aren't doing). At that point, you're_just_tightly coupling changes
to that mixins across_your_entire codebase. If you want to_change_the_way the
buttons implement the gradient,_with the mixin system you go_change the mixin,
but now you need to visit every_other component that_uses that mixin and
double-check that_you_didn't_break anything.

Instead, if you didn't use a mixin and the_component just_contained its
gradient logic_(slightly more verbose maybe, but way