View Single Post
Old 09-16-2019, 09:35 AM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,484
Karma: 145863170
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Brett Merkey View Post
@ JSWolf

I agree with you on stacking selectors. But...



Sorting a well-constructed stylesheet is the fastest way of destroying it. You can construct a smaller, more flexible, more powerful stylesheet by working with the cascade. I know that Calibre has a tool to alphabetize selectors but perhaps it is good that the tool is fairly well hidden.
I highly dislike any CSS that requires it to be in a specific order. There's no need of it. It's best to use classes in the code instead of stacking so classes are not needed.

Trying to shorthand can come back to bite you. For example, using margin: instead of say margin-left: etc. can bit you if it's on an older nook.

Just do it all long form and you'll be better off.
JSWolf is offline   Reply With Quote