View Single Post
Old 07-21-2022, 12:56 PM   #15
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by JSWolf View Post
I'm going to disagree with you here (sort of). You example has a font size of 1.1em being changed to a font size of 1em. That sort of thing should never happen. I can see the classes where the font sizes match, but when they don't, don't have the program assume. Similar is not the same and you could be blowing away code you actually want to keep.
It was just a simple, basic example. Didn't want to overwhelm with advanced ones. It could have easily been:

Code:
font-size: 16px;
and

Code:
font-size: 17px;
The point was recognizing two classes which are not exactly the same, but extremely close to each other.

- - - - -

Side Note: If you wanted advanced examples + a breakdown of every category under the sun, see Post #92+ in that "Adding limited features" thread.

I described every case, using real-life code... and I even color-coded it for you.

Straight out of Word/InDesign, you typically get messes like this:

Spoiler:
Code:
p.Block-indent {
	color:#000000;
	font-family:"Minion Pro Medium", sans-serif;
	font-size:0.917em;
	font-style:normal;
	font-variant:normal;
	font-weight:normal;
	orphans:2;
	page-break-after:auto;
	page-break-before:auto;
	text-align:justify;
	text-decoration:none;
	text-indent:0;
	text-transform:none;
	widows:2;
}

p.Body-text {
	color:#000000;
	font-family:"Minion Pro Medium", sans-serif;
	font-size:0.917em;
	font-style:normal;
	font-variant:normal;
	font-weight:normal;
	orphans:2;
	page-break-after:auto;
	page-break-before:auto;
	text-align:justify;
	text-decoration:none;
	text-indent:18px;
	text-transform:none;
	widows:2;
}


You think indents are important? Okay, then don't merge the classes together.

You think that difference is irrelevant? Merge them.

The great thing about this newer method is you can easily:
  • Compare all classes to each other.
    • A "closeness score" from 100 (exactly the same) to 0 (nothing the same).
    • Highlight different lines.
  • + Check a box and merge those classes together.

Quote:
Originally Posted by Turtle91 View Post
I honestly didn't read all of Tex' post (only so many hours in the day... ),
How dare you not read every word? Make more hours!!!

Quote:
Originally Posted by Turtle91 View Post
For example, if the book font is generally a sans-serif and I want a section to be serif, then I'll give the serif section a slightly larger font-size.
Good thing you'll be able to ignore or pay attention to whatever you want!
  • Think margins are useless? Great!
  • Think fonts are useless? Great!
  • Think colors are useless? And you don't want 50 different shades of gray? Great!

Want to read more details? Great!

Go read the thread above. I explain it all!

Quote:
Originally Posted by Turtle91 View Post
I'm also going to agree with Jon here (sort of)
If I changed the example, then Jon would've inevitably swooped in to rant about:

"Don't you know how bad pixels are for font size?"

- - -

Anyway, all you need to know is:

Soon, there will be yet another tool in the toolbelt!
  • "Remove Unused CSS" gets rid of all the unused stuff.
  • "Consolidate CSS" will help clean up all the leftovers!

Me+KevinH are both figuring out a way to handle this better than ever before.

But, for now, you'll have to keep doing the ol', crappy, manual way.

Last edited by Tex2002ans; 07-21-2022 at 02:21 PM.
Tex2002ans is offline   Reply With Quote