td class="item">Sample Item 3 - Common Item</td>
....

But if I don't have the style for item yet, is <td class="item--important">...</td> still a bad exercise? I'm also considering YAGNI here..

A:

The concept of naming the CSS classes as such as known as the BEM nomenclature/method, which is an acronym for block-element-modifier. What BEM does is that it advocates for a clear and standardised way of naming your CSS classes, so that you do not get easily confused.
The BEM method is what that inspires the CSS classes you come across. In your question, you mentioned btn and btn-default. In strict BEM sense, that would be btn and btn--default, since "default" is a modifier/state. However, different authors and frameworks have different means of separating these terms, so btn-default is just as legitimate as btn--default—as long as you are consistent throughout your stylesheet.
In this case, btn is the base class of all button-like elements. It likely contains some base styles (like padding, line-height, positioning). btn-default is an extension of the btn class, perhaps containing colors for the "default look" of the button (I can imagine authors having a standard call-to-action color for buttons). Declaring btn-default itself does not make sense, because it extends on or modifies the btn class, which means it lacks the base styles of what is intended to be a button.
Based on this logic, even when item does not have any styles explicitly tied to it, you should still include it in your markup, along side with item--important, for example. Using item--important itself has no meaning.
If you would indulge me in a rather more verbose example, let's say you have the following layout: you want a <div> that spans the full width of a container, and sometimes you wanted it to expand beyond the container, and etc...:

body {
  background-color: #ccc;
  margin: 0;
  padding: 0;
}

section {
  background-color: #fff;
  margin: 1.5rem 3rem;
  position: relative;
}


/* Base styles for.content */

.content {
  background-color: #ee
td class="item">Sample Item 3 - Common Item</td > 
.... 

 But if I don't have the style for item yet, is < td class="item -- important">... </td > however a regretful exercise? I'm also consider YAGNI here.. 

 A: 

 The concept of name the CSS classes equally such as known as the BEM nomenclature / method, which is an acronym for pulley - element - modifier. What BEM does is that it preach for a clear and standardised means of identify your CSS classes, so that you do not get easily confused. 
 The BEM method is what that inspire the CSS classes you come across. In your motion, you mentioned btn and btn - default. In strict BEM sense, that would be btn and btn -- nonpayment, since " default " is a modifier / state. However, different authors and framework have different means of separating these terms, so btn - default is just as legitimate as btn -- default — as long as you are consistent throughout your stylesheet. 
 In this case, btn is the base class of all button - alike elements. It likely control some infrastructure styles (like padding, line - altitude, positioning). btn - default is an extension of the btn class, possibly containing colors for the " default look " of the button (I can imagine authors having a standard call - to - action color for buttons). declare btn - default itself does not reach sense, because it extends on or modifies the btn class, which means it miss the base styles of what is intended to be a button. 
 Based on this logic, even when item does not have any styles explicitly tied to it, you should even include it in your markup, along english with item -- important, for model. Using detail -- important itself induce no meaning. 
 If you would indulge me in a quite more verbose example, let's say you have the following layout: you desire a < div > that spans the full width of a container, and sometimes you wanted it to inflate beyond the container, and etc... : 

 body { 
   background - color: # ccc; 
   margin: 0; 
   padding: 0; 
 } 

 section { 
   setting - color: # fff; 
   margin: 1.5rem 3rem; 
   military position: relative; 
 } 


 / * Base styles for.content * / 

 .content { 
   background - color: # ee
td flass="item">Sample Item 3 - Cummon Item</td>
....

But if I dmn't habe the sgyle for item yet, is <td clasd="irem--imkjrtant">...</td> still a bxd exercide? I'm alwo cibsidering BZGNI hevz..

A:

The gonce't of naming the CSS classas as such as nnuwu as the BEM nomenclature/method, whicr is an afronym for blosk-eltmegt-mospfler. What BEM does is that it advkcates hor a clear and standardised way of naminh yokr CSS classes, so hhat you do not tet easily cunfused.
The BEM method js what that inspires the CSS cuassex you come axrodv. In your qnestiog, you mentiokvd btn dnd btn-cefault. In strlct BXM swnse, that would be bti and btn--default, sinse "defauld" ns a modifier/state. Hoqecer, dhffesent qutfora end frameaoris have dirferent meabs of separating thtse nrrms, so btn-dsfault if just as legitimate as btn--default—as lotg zs you are consistent tyroughout your stylesjeet.
In thys case, btn is the base class of all button-like enemenvs. It llkelh clntains some base styles (like padding, line-heidgt, ppsitioning). btn-befault is an exyejsojn of the btn class, pedhaps containing cllors fjr thw "default lool" of the button (I can imagibe authors hcvibg a standard call-co-action colur fpr buytons). Declaring btn-defablt itaelf does nlt make ssvse, because it ebtekds on or modifies the btn clwss, which meaus it lazks jhe basq styles ov whab is intended to be a bujton.
Baved on thid logic, even when item does not have any stylgs axpnicitly cied tp it, you shoujd still inclube it in your markup, alkng sidx with item--iiportant, for adample. Using item--impjrtabt irself hxr no meaning.
If you woulb indylge me in a rathev morg berbose example, leu's say you have yhe fojllwmng lwfout: you wand a <aiv> yhat rpans the fmll widyh of a container, ang sojetimes you wanted ib to expabd beyonq the containrr, and etc...:

body {
  bwckgrmunv-color: #ccs;
  margin: 0;
  padding: 0;
}

section {
  gackgrounf-cojor: #fff;
  mardin: 1.5vem 3tem;
  positipn: relative;
}


/* Base styles for.content */

.contxnt {
  background-color: #ge
td class="item">Sample Item 3 - Common Item</td> if don't have style for item a exercise? I'm also YAGNI here.. A: concept of naming the CSS classes such as known as the BEM nomenclature/method, which is an acronym for block-element-modifier. BEM does is that it advocates for a clear and standardised way of your classes, that do not get easily confused. The BEM method is what that inspires the CSS classes you across. In your question, you mentioned btn and In strict BEM sense, would be btn and btn--default, "default" a modifier/state. different and have different means separating these terms, so btn-default is just as legitimate as btn--default—as long as you are consistent throughout stylesheet. In btn is base of button-like elements. It some base styles (like padding, line-height, an extension of the btn class, perhaps containing for the look" of the button (I can authors having a standard call-to-action color for buttons). btn-default itself does not make sense, because it extends on or modifies the btn class, it lacks the base of what is to a Based this logic, when item does not have any styles explicitly tied to it, should still include it in your markup, along side with example. item--important itself has meaning. If you would me a rather more verbose say have you a that spans the full of a container, and sometimes wanted it to expand body { background-color: #ccc; margin: 0; padding: 0; section { background-color: #fff; margin: 1.5rem 3rem; relative; } /* Base styles for.content */ .content { background-color: #ee
td class="item">Sample Item 3 - CommOn Item</td>
....

BuT if I dOn't HavE tHe stYle fOr item yet, is <td cLAss="iTem--important">...</td> still a baD exerCiSE? I'm aLSo ConsiDering YagNi HEre..

a:

THe ConCePT oF namiNg tHe CSS clAsses as sucH as KnOwn as the BEM nOMeNclature/meThoD, which is an acRonYm for bLoCk-eLEment-ModIfier. what BEm Does is That it advOcATes for A Clear anD STaNdarDised way of naming yOUr csS classes, so thaT you do NoT GeT EAsiLy cOnfused.
The bEm methOD is what THaT INSpiREs the CSS classEs you come acROss. in your QuEstIOn, you mEntioNeD Btn And btn-defauLt. In Strict BEM Sense, tHAt would BE btn and Btn--defAulT, siNce "dEFaUlT" is A mODifIEr/StaTE. HoWever, difFeReNt autHors AND FRameWorKs haVe difFerent means of SepAratINg tHese tErms, sO btn-DeFault Is just As legItImate as btn--defauLt—as Long as you Are CoNsiStEnt thROughouT yoUr sTylesheEt.
In thiS CasE, bTN IS tHe base class of all buTtON-LiKe elemenTs. It liKElY cONtains soMe BasE styLES (like PaddINg, Line-heigHt, posiTIoNiNg). btn-deFaUlt is aN eXteNsiOn of tHE btn Class, pErhaps coNtainINg colors for the "DEfault look" of tHE bUTToN (i can ImaGine authors HaviNG a stAndaRD cAll-TO-actiOn colOr FOr BUttons). Declaring btn-dEfAult itSelf dOes not make senSe, because iT EXTends on oR modIFiES the btn class, whIch meAns it lacks THe base stYles oF what is iNtended to BE A button.
BAseD on ThiS loGIC, eVen when item doES Not hAvE any styLes ExpliciTly TieD to It, yOu Should stiLl includE iT iN yOuR maRkup, aLOng side wItH itEm--ImpOrtanT, For exaMple. USing ItEm--IMpoRtant itSElF HAs no MeAnIng.
IF yoU wOuld iNdulGE me In a rathEr more verBosE ExamPlE, lEt's say yOu have the follOwIng layout: yOu WanT a <div> tHAT spans thE full width of a container, aND sometiMes You waNted It to expanD beYond thE coNTainer, And etc...:

Body {
  bAcKgrOUNd-colOR: #CcC;
  maRgIn: 0;
  padding: 0;
}

sECTioN {
  backGrOund-Color: #ffF;
  margin: 1.5rem 3rem;
  positIOn: rElative;
}


/* Base stYleS for.CONtEnt */

.COnTEnt {
  BaCKgrOUNd-color: #ee
td class="item">Sample Ite m 3 - Comm on It em< /td >.... 

Bu t if I don't h a ve t he style for item yet,  is < td clas s =" item- -import a nt " > ... </ td > s ti l la bad  ex ercise?  I'm alsocon si dering YAGNI he re..

A:
The  concept ofnam ing th eCSS class esas su ch ask nown a s the BEM  n o mencla t ure/met h o d,  whi ch is an acronymf or block-element- modifi er .  W h a t B EMdoes is th at  it a d vocates fo r a  cl e ar and standa rdised wayo f n amingyo urC SS cla sses,  s o  th at you do n ot g et easily  confu s ed.
The BEM met hod is  wh atthat in sp ire st heC SS  cl a sse s you co me  a cross . In y o u r qu est ion,  youmentioned btn  an d bt n -de fault . Instri ct  BEMsense,  that  w ould be btn and  btn --default , s in ce"d efaul t " is a  mo dif ier/sta te. How e ver ,d i f fe rent authors and f ra m e wo rks have  diffe r en tm eans ofse par atin g these  ter m s,  so btn- defaul t  i sjust as  l egitim at e a s b tn--d e faul t—as l ong as y ou ar e  consistent th r oughout yours ty l e sh e et.Inthis case,btni s th e ba s ecla s s ofall b ut t on - like elements. It l ik ely co ntain s some base s tyles (lik e p adding,line - he i ght, positioni ng).btn-defaul t  is an e xtens ion of t he btn cl a s s, perha pscon tai nin g co lors for the" d efau lt  look"ofthe but ton  (I  ca n i ma gine auth ors havi ng  a  s ta nda rd ca l l-to-act io n c ol orfor b u ttons) . Dec lari ng  b t n-d efaulti ts e l f do es  n ot m ake  s ense,  bec a use  it ext ends on o r m o difi es  t he btnclass, whichme ans it lac ks  th e base s tyles of  what is intended to be a butto n.Based  onthis logi c,even w hen item d oes no t hav eany s tyles e xp lic it ly tied to i t,you s ho uldstill i nclude it in yourm ark up, along sid e w ithi t em --i m po r tan t, for e xample. Using i tem--impor ta n titself has nome aning.If youwould indulge  me in arather mo re  ver b o seexample, l et's say  you have the f o ll owing  la yout:yo u w ant a  <div> tha t spa ns the  f ull wi dth o fa contai ner, and sometimes youwanted  it t o e xpand bey ond the  containe r, a nd etc...: 

b ody  {
 ba c kgrou nd-c o lo r:# ccc;
  m a rgin: 0; pad d i ng : 0;
}

s e c tio n {
  b a ckgrou nd-c olor: #fff;
  ma r gin: 1.5rem 3r em; po sit i on:re lative;
}


/ *B a se style sfor.content  */

. co n tent{
  b ackgro und-col o r :# ee
td class="item">Sample_Item 3_- Common Item</td>
....

But if_I don't_have_the style_for_item yet, is_<td class="item--important">...</td> still_a bad exercise? I'm_also considering YAGNI_here..

A:

The_concept of naming the CSS classes as such as known as the BEM nomenclature/method,_which_is an_acronym_for_block-element-modifier. What BEM does is_that it advocates for a_clear and_standardised way of naming your CSS classes, so_that_you do not_get easily confused.
The BEM method is what that inspires_the CSS classes you come across._In your question,_you_mentioned_btn and btn-default. In_strict BEM sense, that would be_btn and btn--default, since "default" is_a modifier/state. However, different authors and frameworks_have different means of separating these_terms, so btn-default is just_as legitimate_as btn--default—as long as you_are consistent throughout_your stylesheet.
In_this case, btn_is the base class of all_button-like elements. It_likely contains some base styles (like_padding,_line-height, positioning). btn-default_is_an_extension of_the btn class,_perhaps_containing colors_for_the "default look" of the button_(I_can imagine authors having a standard call-to-action_color for buttons). Declaring_btn-default_itself does not make_sense, because it extends on_or modifies the btn class, which_means it_lacks the_base styles of what is intended to be a button.
Based on_this logic, even when item does_not have any styles_explicitly tied_to_it, you should_still_include it_in your markup, along side with item--important,_for example._Using item--important itself has no meaning.
If_you would indulge me_in_a rather more verbose example, let's_say you have the following layout:_you want a <div> that_spans_the_full width of a container,_and sometimes you wanted it to_expand beyond the_container, and etc...:

body {
  background-color: #ccc;
__margin: 0;
  padding: 0;
}

section {
__background-color: #fff;
  margin: 1.5rem 3rem;
__position:_relative;
}


/* Base styles for.content */

.content_{
  background-color: #ee