Quote:
Originally Posted by JSWolf
That is ugly formatted code. I cannot stand CSS code that's all on one line.
|
I will certainly add that to the list I keep of things you cannot stand...and file it appropriately...
Spoiler:
1) This was an
example of inserting an image as a scene break - not as "approved by JSWolf CSS formatting".
2) If you think "{width:10%; max-width:100px} or {margin:2em auto; text-align:center}" is overly complex and unreadable, then you just need more practice...the little semi-colon thingie means there are different commands on the same line - which the computer has no issues reading whatsoever - neither do I.
3) I do not care about the minuscule number of bytes saved by not using CR/LF...it is an organizational thing for me. I use the same standard CSS file as a baseline. I know that all the CSS on the page is correct...I'm not looking to decipher what each item does...that's why I name the selectors appropriately in the first place. I don't like to scroll through page after page of css while I'm looking for something. The selectors are all nice and organized and lined up on the left side of the screen for me to quickly find the one I care about...then I can edit it as, and if, necessary. I have no trouble identifying the semicolon and realizing that it means different styles... It's a shame that you do.
4) When I am done editing I use a neat little (Sigil) plugin "
cssRemoveUnusedSelectors" that ...wait for it ... Removes Unused Selectors ... AND ... Reorganizes the CSS into a format that you would approve of...because it's "pretty"??
Quote:
Originally Posted by GrannyGrump
Just another thought about the skull decoration ---
Depending on how it displays proportionate with the font, it might be preferable to code the width in em instead of percentage of screen width. If someone is reading on a very large screen with a smallish font, 10% would be enormous in comparison the text.
I usually put this kind of decoration into a custom font, so that it is actually a font character, but when using a small image, I use ems. (except for old Mobi7, where I think you MUST set it in pixels)
div.TxtBrk img
{
width: 4em;
max-width: 100px;
}
|
That's a great idea - I'll give it a try - Thanks!