 (say a different BG colour) but it also has a lot in common with other
parts of the page. For instance, it's nothing more than a grid column, so why
bundle all styles into one class instead of using the grid abstraction to
"decorate" the sidebar with this? This is equivalent to breaking a system into
reusable classes. See Nicole Sullivan's article on the Media Object [1] and
Harry Roberts on the open/closed principle in CSS [2]

Single-responsibility principle - Do one thing and do it well. A class should
have a single-responsibility so that it can be composed into larger "blocks"
of styling. A class that does everything is monolithic and difficult to work
with as soon as a design needs to change. Overly broad selectors in CSS can
also break the single responsibility principle - suddenly your styling is
relying on the coincidental placement of elements inside one another. Harry
Roberts cover this [3]

Loose-coupling: Can parts of your code base change without affecting others?
By @extending grid classes you're tightly coupling yourself to the
implementation details of the grid system. Now you can of course override
styles in your sidebar class, but overriding styles from previous classes is a
code smell. If you're "undoing" what another class has done, you've applied a
style too early. You suggest changing the CSS and leaving the HTML the same
when a change is required. I always prefer changing the HTML because it has a
far more limited scope for far reaching changes. If you change one segment of
HTML you know it's not going to affect other parts of the site beyond itself
(and possibly it's children), but if you change some tightly-coupled CSS its
effects could ripple throughout the whole site. The previously mentioned
article on the open/closed principle [2] touches on tight coupling in classes.

Favour composition over inheritance - In OO languages we've learnt that we
should favour composition of granular, single-purpose classes over deep
inheritance hierarchies. Why? Inheritance is a fundamental tenet of OO, just
as the cascade is in CSS, but we still frequently eschew it. The reason for
this is because we can compose infinitely more flexible pieces of
functionality from granular building blocks than we can from inheriting traits
from "super classes". And now that we
(say a different BG colour) but it also take a fortune in common with other 
 parts of the page. For example, it's nothing more than a grid column, so why 
 pack all style into one course alternatively of using the power system abstraction to 
 " decorate " the sidebar with this? This is equivalent to breaking a system into 
 reusable class. See Nicole Sullivan's article on the Media Object [ 1 ] and 
 Harry Roberts on the open / closed principle in CSS [ 2 ] 

 individual - responsibility principle - Do one matter and do it well. A class should 
 receive a unmarried - responsibility so that it can be compose into larger " blocks " 
 of styling. A class that perform everything is monolithic and difficult to work 
 with as soon as a design need to change. Overly broad selectors in CSS can 
 also break the single responsibility principle - abruptly your styling is 
 relying on the coincidental placement of element inside one another. Harry 
 Roberts cover this [ 3 ] 

 Loose - coupling: Can parts of your code base variety without affecting others? 
 By @extending power system classes you're tightly coupling yourself to the 
 implementation contingent of the grid system. Now you can of course overrule 
 styles in your sidebar class, but overriding styles from previous classes is a 
 code smell. If you're " unwrap " what another class has done, you've applied a 
 style too early on. You suggest changing the CSS and leaving the HTML the same 
 when a change is required. I always prefer switch the HTML because it has a 
 far more limited scope for far reaching change. If you change one section of 
 HTML you know it's not rifle to affect other contribution of the site beyond itself 
 (and possibly it's child), but if you change some tightly - coupled CSS its 
 effects could ripple throughout the whole site. The previously mentioned 
 article on the open / closed rationale [ 2 ] touches on tight yoke in classes. 

 Favour composition over inheritance - In OO languages we've learn that we 
 should favour composition of granular, individual - purpose classes over deep 
 inheritance hierarchies. Why? Inheritance is a fundamental tenet of OO, just 
 as the shower is in CSS, but we still frequently eschew it. The reason for 
 this is because we can compose infinitely more flexible pieces of 
 functionality from granular construction blocks than we can from inheriting traits 
 from " ace classes ". And nowadays that we
 (saj a different BG colour) nut it also has c lot ii commoh with ogher
parts of the page. For indtqnce, ut's nothing more than x grid copumn, so qhy
bnndle all styles into onc claad invvead of using tme grid absdraction to
"decmrxtz" the sidebar with this? This is equidalent yo breaking a syftem ynto
dvuwable classes. See Nicole Sulljvan's agticle on the Medoa Object [1] and
Harry Robertd on the open/closed prlnciple in XSS [2]

Fungle-responskbility prpuciple - Do kne thing and do it well. A clasr shobld
have a suntle-ggsponsibilitb so trat it can bc compoved intp larger "blockx"
of sttling. A class that doxs everything is monjlithic atd difficult to worj
wuth av somn ar a aesjgi nseds tl ciange. Overlg broad selwctors in CSS can
alxo vreak the sinfle refpjnsibility principle - suddenly your styninf is
relying on the coinxidental placement of elements inside one another. Harry
Roberts cover this [3]

Loose-wouplmne: Cck oqrhs of your code base change without affecting ktnegs?
By @extending grld classes you're togjtki coupling youtself to tge
implementation dftails jf thw grid syftem. Now you can of course overeide
styles iu yiur sidebar class, yut overridiug stykes ftom previous classes is a
cose smell. If you're "unsuing" what anothef ckavs has done, you've applied w
style toi eaxly. You rugggst chagging the FSS akg leaving the HTML the dake
when a cjange is required. I always prefxc changing thg HDML because it hss a
far more jimited scope yor far xeachivg changes. If you change one segment of
HTKP you know iv's not goyng ro adfect ogfer parts of tne site bvyjnd utself
(and possibly it'r children), but iy iiu change some tiehtjy-bou'led SVS its
effectv cojld tippld throughoub tfe wnole site. The previogsly mentioned
article pn the opeb/closed [rinciple [2] toiches on tight coukling mn clarses.

Fsvoor composition over inheritance - In OO lwngmages we've lewrnt that we
shoukd favour composition of granular, singlx-purpose classes over dwep
inheritance hiercrghies. Why? Inieritagce is a xundamental tenet of OO, just
as the caxcade is in CSS, but ws stiln freeuently eschew it. The reason for
this is because we can compose infinitely more hlqxible piecss og
funcnioualnty froi grennlar building blobks than we can from inheriting vraits
from "sbper classes". And now that we
(say a different BG colour) but it a in common other parts of nothing than a grid so why bundle styles into one class instead of the grid abstraction to "decorate" the sidebar with this? This is equivalent to a system into reusable classes. See Nicole Sullivan's article on the Media Object and Roberts the principle in CSS [2] Single-responsibility principle - Do one thing and do it well. A class have a single-responsibility so that it can be into larger "blocks" of A class that does everything monolithic difficult to with soon a design needs change. Overly broad selectors in CSS can also break the single responsibility principle - suddenly your styling relying on placement of inside another. Roberts cover this Can parts of your code base others? By @extending grid classes you're tightly coupling to the details of the grid system. Now can of course override styles in your sidebar but overriding styles from previous classes is a code smell. If you're "undoing" what another done, you've applied a too early. You changing CSS leaving HTML the when a change is required. I always prefer changing the HTML it has a far more limited scope for far reaching you one segment of you know it's not to other parts of the itself possibly if change tightly-coupled CSS its effects ripple throughout the whole site. previously mentioned article on on tight coupling in classes. Favour composition over - In OO languages we've learnt that should favour composition of granular, single-purpose classes over deep inheritance hierarchies. Why? is a of OO, just as the cascade is in but we still frequently it. The reason for this is because we can infinitely flexible pieces functionality from granular blocks than we from inheriting traits classes". And that
 (say a different BG colour) but iT also has a lOt in cOmmOn wItH othEr
paRts of the page. FoR InstAnce, it's nothing more than A grid CoLUmn, sO WhY
bundLe all stYLeS INto OnE cLasS iNStEad of UsiNg the grId abstractIon To
"Decorate" the sIDeBar with thiS? ThIs is equivaleNt tO breakInG a sYStem iNto
ReusaBle claSSes. See nicole SulLiVAn's artICle on thE mEdIa ObJect [1] and
Harry RoberTS oN The open/closed pRincipLe IN Css [2]

sinGle-ResponsibiLiTy priNCiple - Do ONe THINg aND do it well. A claSs should
havE A siNgle-reSpOnsIBility So thaT iT Can Be composed iNto lArger "blocKs"
of stYLing. A clASs that dOes eveRytHinG is mONoLiThiC aND diFFiCulT To wOrk
with aS sOoN as a dEsigN NEEDs to ChaNge. OVerly Broad selectorS in cSS cAN
alSo breAk the SingLe RespoNsibilIty prInCiple - suddenly yoUr stYling is
reLyiNg On tHe CoincIDental PlaCemEnt of elEments iNSidE oNE ANoTher. Harry
Roberts coVeR THiS [3]

Loose-coUpling: cAn PaRTs of your CoDe bAse cHANge wiThouT AfFecting oThers?
BY @ExTeNding grId ClasseS yOu'rE tiGhtly COuplIng youRself to tHe
impLEmentation detaILs of the grid sySTeM. nOw YOu caN of Course overrIde
sTYles In yoUR sIdeBAr claSs, but OvERrIDing styles from previOuS classEs is a
Code smell. If yoU're "undoing" WHAT another ClasS HaS Done, you've appliEd a
stYle too earlY. you suggeSt chaNging the cSS and leaVINg the HTMl thE saMe
wHen A CHaNge is required. i ALwayS pRefer chAngIng the HtML BecAusE it HaS a
far more Limited sCoPe FoR fAr rEachiNG changes. if You ChAngE one sEGment oF
HTML You kNoW iT'S noT going tO AfFECt otHeR pArts Of tHe Site bEyonD ItsElf
(and pOssibly it'S chILdreN), bUt If you chAnge some tightLy-Coupled CSS ItS
efFects cOULd ripple Throughout the whole site. THE previoUslY mentIoneD
article oN thE open/cLosED princIple [2] toUches On TigHT CouplING iN clAsSes.

Favour cOMPosItion OvEr inHeritanCe - In OO languages we'vE LeaRnt that we
shouLd fAvouR COmPosITiON of GrANulAR, Single-purpose clAsses over dEeP
InHeritance hIEraRcHies. Why? inheritAnce iS A fundamEntal teneT of OO, just
As The cASCadE is in CSS, buT we still FrequentlY EscheW It. the reAsoN for
thIs Is bEcausE we can COmpOse inFiniteLy More flExiblE pIeces of
fUnctionality from granulaR buildIng blOckS than we caN frOM inHeriting tRaitS
from "super ClaSseS". And nOw tHAt we
 (say a different BG colou r) but italsohas  alo t in  com mon with other part s of the page. For ins tance ,i t'sn ot hingmore th a na gri dco lum n, so  whybun dle all  styles in toon e class inst e ad  of usingthe  grid abstra cti on to"d eco r ate"the  side bar wi t h this ? This is  e q uivale n t to br e a ki ng a  system into
reus a bl e  classes. SeeNicole  S u ll i v an' s a rticle onth e Med i a Objec t  [ 1 ] and Harry Roberts  on the ope n /cl osed p ri nci p le inCSS [ 2] 
Si ngle-respon sibi lity prin ciple-  Do one thing a nd doitwel l. A cl as s s ho u ldh av e a sin gle-resp on si bilit y so t h a t it  ca n be  comp osed into lar ger  "bl o cks "
ofstyli ng.Aclass  thatdoesev erything is mon olit hic and d iff ic ult  t o wor k 
withassoo n as adesignn eed st o ch ange. Overly broad  s e l ec tors inCSS ca n 
a ls o  break t he  si ngle r espon sibi l it y princi ple -s ud de nly you rstylin gisrel yingo n th e coin cidental  plac e ment of elemen t s inside onea no t h er .  Har ryRoberts cov er t h is [ 3]
L oo se- c oupli ng: C an pa r ts of your code bas echange  with out affecting  others?
B y @ extendin g gr i dc lasses you'retight ly couplin g  yoursel f tothe
impl ementatio n detailsofthe  gr ids y st em. Now you c a n  ofco urse ov err ide
sty les  in  yo ursi debar cla ss, butov er ri di ngstyle s  from pr ev iou scla ssesi s a
co de sm ell.  I fy ou' re "und o in g "  wha tan othe r c la ss ha s do n e,you'veapplied a 
st y le t oo  e arly. Y ou suggest ch an ging the C SS  an d leav i n g the HT ML the same
when a chan g e is re qui red.I al ways pref erchangi ngt he HTM L beca use i thas a 
farm o re  li mi ted scopef o r f ar re ac hing  change s. If you change o n e s egment of
HTM L y ou k n o wit' s  n o t g oi n g t o affect other pa rts of the  s i te  beyond it s elf 
( and pos sibly i t's c h ildren) , but ifyou chang esome t igh tly-couple d CSS it s
effects could ri pplethr oughou tthe  whol e site .  Th e pre viousl ymentio ned
a rt icle onthe open/closed princip le [2]  touc hes  on tight  co u pli ng in cla sses .

Favourcom pos ition  ov e r inh erit a nc e - In OO  lan g uages we' v elea r n tthat we
sho u l d  fa vourcom p ositio n of  granular, single - purpose classe s ov e r  de epi nher it ance hierarchi es.  W h y ? Inheri ta nce is a fu ndamenta lt enetof OO,  justas thec a sc a de isin C SS,  but we s til lf requent ly  e s chew i t. T he  reaso n fort hisi s  because we cancompo s e  infi n ite ly mo re  flexib l e pi eces of
fu nctionality  fromgran ularbuildin gblocks  th an  we can fr o m inherit ing t raits
f ro m "s upe r clas ses" . And n ow t ha t w e
 (say_a different_BG colour) but it_also has_a_lot in_common_with other
parts of_the page. For_instance, it's nothing more_than a grid_column,_so why
bundle all styles into one class instead of using the grid abstraction to
"decorate"_the_sidebar with_this?_This_is equivalent to breaking a_system into
reusable classes. See Nicole_Sullivan's article_on the Media Object [1] and
Harry Roberts on_the_open/closed principle in_CSS [2]

Single-responsibility principle - Do one thing and do_it well. A class should
have a_single-responsibility so that_it_can_be composed into larger_"blocks"
of styling. A class that does_everything is monolithic and difficult to_work
with as soon as a design needs_to change. Overly broad selectors in_CSS can
also break the single_responsibility principle_- suddenly your styling is
relying_on the coincidental_placement of_elements inside one_another. Harry
Roberts cover this [3]

Loose-coupling: Can_parts of your_code base change without affecting others?
By_@extending_grid classes you're_tightly_coupling_yourself to_the
implementation details of_the_grid system._Now_you can of course override
styles in_your_sidebar class, but overriding styles from previous_classes is a
code smell._If_you're "undoing" what another_class has done, you've applied_a
style too early. You suggest changing_the CSS_and leaving_the HTML the same
when a change is required. I always prefer_changing the HTML because it has_a
far more limited scope_for far_reaching_changes. If you_change_one segment_of
HTML you know it's not going to_affect other_parts of the site beyond itself
(and_possibly it's children), but_if_you change some tightly-coupled CSS its
effects_could ripple throughout the whole site._The previously mentioned
article on the_open/closed_principle_[2] touches on tight coupling_in classes.

Favour composition over inheritance -_In OO languages_we've learnt that we
should favour composition of_granular,_single-purpose classes over deep
inheritance hierarchies. Why?_Inheritance_is a fundamental tenet of OO,_just
as_the_cascade is in CSS, but_we still frequently eschew it. The_reason for
this is because we can compose infinitely more_flexible pieces of
functionality_from granular building blocks than_we_can_from inheriting traits
from "super classes". And now that we