Is there a way make HTML code independent from changes in CSS class names? -


i using twitter bootstrap 3 while, twitter bootstrap 4 coming. , new twitter booststrap comes changes, renaming .table-condensed .table-sm example. sake of future possible migration current future version, there way make html code independent changes in css class names? example, if have .table-condensed class, there way create own class table-small , create existing twitter bootstrap's class table-condensed? (pseudo-code):

.table-small {     join(".table-condensed") } 

i use pure css until moment (i front-end developer rather full-stack:) ), if answer me if thing possible in way, maybe preproccesors or that, grateful - thank in advance !

if you're using sass can use @extend function.

however, it's recommended avoid doing copies selected class new 1 thus, essentially, doubling size of css

the solution either not upgrade bs-4, unless have requirement to. or update html when do

edit

reading through sass docs, seems functionality has been changed work using comma syntax. best option going forward.

it still generates excess css doubling number of classes, not bad duplicating css


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -