Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Realm Works Forums > Realm Works Discussion

Notices

Reply
 
Thread Tools Display Modes
MaxSupernova
Senior Member
 
Join Date: Mar 2014
Posts: 411

Old January 26th, 2017, 03:15 PM
Quote:
Originally Posted by EightBitz View Post
I use the P tag. I strip out some inline formatting first, though. It seems to work. Are you having issues?
Nope. I was just digging in to the html to do some custom styling and was appalled at the number of RWSnippet spans.

My first thought was that it was deliberate, and just a bug that the RWSnippet span was also applied to links (they should be RWLink or something), which is why I reported it.

If they aren't there to delineate links, there's no point except to make the HTML much less readable.

But nope, that's the way it's supposed to be.

Looking at it makes me twitch, but that's the way it is and I'll deal. :-D
MaxSupernova is offline   #71 Reply With Quote
tmilktoast
Junior Member
 
Join Date: Jun 2014
Location: Wisconsin, USA
Posts: 17

Old January 26th, 2017, 07:40 PM
Just thought I would report in. I am no longer having the problem I reported earlier. I'm not sure what changed, whether it was something on my system (perhaps likely since I'm the only one who reported it), but it is now working well.

Other good news: those funky Star Wars: Edge of the Empire dice fonts get exported correctly and show up in the HTML, but only if you check Preserve Original Text Formatting. I'm not sure what else this setting might affect.

I do have a couple minor formatting issues in HTML output. My troublesome bullet lists are about five spaces further left than the paragraphs around them. And the table formatting is off-kilter. I have added background colors to the tables, changed the fonts, and some other stuff that may have confused it.

Here's an example showing those issues: http://moon.gibbous.org/export-test.html

I did notice that the table formatting weirdness is related to the CSS code because when I first uploaded the HTML file to my site I forgot to upload the CSS file and the tables looked okay then.

If I have time, I might mess around with some CSS.

So, again, I'm just posting this because I figured you'd want to know. Your script is great and I'm happy we have it.
tmilktoast is offline   #72 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old January 26th, 2017, 11:36 PM
I'm glad your original bug is gone. If I had to guess, I would attribute that to the way I was originally using github. I was copying and pasting the script into gists instead of uploading files, and I think it was changing some character encoding.

The reason I'm guessing this is what happened is that I could never reproduce your original error, even with the exact same rwoutput file that you were using.

In regards to preserving the original formatting, what script strips out is the font type, size, and colors (font color and background color). It makes complete sense to me that using this options preserves your Star Wars dice characters.

In regards to tables and lists, there could be a few different things going on here. I've noticed that between IE, Chrome and Firefox, there are notable differences between how tables are displayed. IE doesn't seem to indent tables at all (at least with my script's output) where as Firefox does. I forget what the quirks were with Chrome.

I should have mentioned this in the release notes. But again, that's just one possibility. The only formatting I strip from tables is what I've mentioned above, and if you preserve formatting, I don't even strip that.

My understanding is that inline formatting overrides external CSS files, so if you preserve formatting, the table formatting in the CSS file should have ... no ... effect? (Famous last words, right?)

I'm no expert here. I'm still learning. So don't take that as an authoritative statement (hence the question marks).

The lists are what have me most confused, at least in the aspect that lists are much simpler than tables, so their behavior should be more straightforward.

That being said, I did change the way I was managing indents, because the old way I was doing it was causing a conflict with existing inline formatting. It seemed to work OK, but I could have missed something. Or, again, it could come down to browser interpretation.

What I would suggest is that you export at least this one topic, if not two or three that are having the same issues, and I'll see what I can figure out. Also, send the me the specific command line that you're using (this can be copied and pasted from the GUI), the HTML output you're getting, which browser you're using, and screenshots of how your browser is rendering the output.
EightBitz is offline   #73 Reply With Quote
Parody
Senior Member
 
Join Date: Jan 2013
Location: Rochester, MN
Posts: 1,515

Old January 27th, 2017, 01:34 AM
Quote:
Originally Posted by EightBitz View Post
In regards to tables and lists, there could be a few different things going on here. I've noticed that between IE, Chrome and Firefox, there are notable differences between how tables are displayed.
One thing that might help is specifying a DOCTYPE. The sample outputs I've seen don't have one, leaving the browsers to make more guesses about how to display your HTML+CSS. (It's called "rendering in Quirks Mode" if you want more info.)

The DOCTYPE needs to be the first line of your HTML file. The one for HTML 5 is pretty simple:
Code:
<!DOCTYPE html>
Adding that won't make the different browsers (and versions of browsers) create identical output, but they should end up a lot closer than before.

Quote:
Originally Posted by EightBitz View Post
My understanding is that inline formatting overrides external CSS files, so if you preserve formatting, the table formatting in the CSS file should have ... no ... effect? (Famous last words, right?)
The style attribute does override earlier styling, but only for the things specified within. Anything not included in the style attribute will be determined by whatever other rules exist. The rules in your external CSS file will only have no effect if the style attribute overrides everything within those rules.

Quote:
Originally Posted by EightBitz View Post
The lists are what have me most confused, at least in the aspect that lists are much simpler than tables, so their behavior should be more straightforward.
Looking at the part of tmilktoast's sample where there's a list, the surrounding <p> elements' style attributes have a margin-left but the <ul> does not. HTML lists should be treated the same as paragraphs and tables for most styling purposes.

FWIW, I think you'd be better off putting a <div> around the things you want to indent and adding padding or margin to the <div>. (I threw a quick example up at JSBin.)


Last edited by Parody; January 27th, 2017 at 02:07 AM. Reason: Added example.
Parody is offline   #74 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old January 27th, 2017, 02:22 AM
Quote:
Originally Posted by Parody View Post
One thing that might help is specifying a DOCTYPE. The sample outputs I've seen don't have one, leaving the browsers to make more guesses about how to display your HTML+CSS. (It's called "rendering in Quirks Mode" if you want more info.)

The DOCTYPE needs to be the first line of your HTML file. The one for HTML 5 is pretty simple:
Code:
<!DOCTYPE html>
Adding that won't make the different browsers (and versions of browsers) create identical output, but they should end up a lot closer than before.


The style attribute does override earlier styling, but only for the things specified within. Anything not included in the style attribute will be determined by whatever other rules exist. The rules in your external CSS file will only have no effect if the style attribute overrides everything within those rules.


Looking at the part of tmilktoast's sample where there's a list, the surrounding <p> elements' style attributes have a margin-left but the <ul> does not. HTML lists should be treated the same as paragraphs and tables for most styling purposes.

FWIW, I think you'd be better off putting a <div> around the things you want to indent and adding padding or margin to the <div>. (I threw a quick example up at JSBin.)
The thing that confuses me is that in my own testing, there IS a margin-left in the UL tag. My lists, ordered and unordered, are properly indented along their respective topics and sections.

One thing I noticed though, is that my UL tags have two style declarations.

Code:
<ul style="margin-left:105px;" start="1" style="margin-top:0;margin-bottom:0;">
I fixed this in other parts of the code to incorporate everything into one style declaration. I missed doing that for lists.

I'm wondering if maybe in the process of uploading his html file, something in that process detected the two style statements, determined that as invalid, and deleted one of them?

Or maybe he manually edited something? I have no idea. I don't understand why I would have the margin-left statements in my output, and he wouldn't.
EightBitz is offline   #75 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old January 27th, 2017, 02:27 AM
Quote:
Originally Posted by EightBitz View Post
The thing that confuses me is that in my own testing, there IS a margin-left in the UL tag. My lists, ordered and unordered, are properly indented along their respective topics and sections.

One thing I noticed though, is that my UL tags have two style declarations.

Code:
<ul style="margin-left:105px;" start="1" style="margin-top:0;margin-bottom:0;">
I fixed this in other parts of the code to incorporate everything into one style declaration. I missed doing that for lists.

I'm wondering if maybe in the process of uploading his html file, something in that process detected the two style statements, determined that as invalid, and deleted one of them?

Or maybe he manually edited something? I have no idea. I don't understand why I would have the margin-left statements in my output, and he wouldn't.
Or maybe there's something in his XML source that doesn't fit with how I'm parsing the different tags, so his lists go undetected as such. To determine that, though, I'd need his XML source.
EightBitz is offline   #76 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old January 27th, 2017, 02:54 AM
Quote:
Originally Posted by Parody View Post
One thing that might help is specifying a DOCTYPE. The sample outputs I've seen don't have one, leaving the browsers to make more guesses about how to display your HTML+CSS. (It's called "rendering in Quirks Mode" if you want more info.)

The DOCTYPE needs to be the first line of your HTML file. The one for HTML 5 is pretty simple:
Code:
<!DOCTYPE html>
Adding that won't make the different browsers (and versions of browsers) create identical output, but they should end up a lot closer than before.


The style attribute does override earlier styling, but only for the things specified within. Anything not included in the style attribute will be determined by whatever other rules exist. The rules in your external CSS file will only have no effect if the style attribute overrides everything within those rules.


Looking at the part of tmilktoast's sample where there's a list, the surrounding <p> elements' style attributes have a margin-left but the <ul> does not. HTML lists should be treated the same as paragraphs and tables for most styling purposes.

FWIW, I think you'd be better off putting a <div> around the things you want to indent and adding padding or margin to the <div>. (I threw a quick example up at JSBin.)
Also, thanks for the tips. I've added the doctype for the next release.

I'll play around with <div> and see what I can do.
EightBitz is offline   #77 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old January 27th, 2017, 03:36 AM
Definitely love the div tag. This is going to take a little bit of work, but in the end, the code will be streamlined, and this will fix a few things that have been annoying me.
EightBitz is offline   #78 Reply With Quote
tmilktoast
Junior Member
 
Join Date: Jun 2014
Location: Wisconsin, USA
Posts: 17

Old January 27th, 2017, 06:34 AM
Regarding those Edge of the Empire fonts, I imagine none of you are seeing them in your browser because you probably don't have them installed on your PC.

EightBitz, do you still want me to send you those things you asked for, or were you just going to work on Parody's suggestions?
tmilktoast is offline   #79 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old January 27th, 2017, 06:50 AM
Quote:
Originally Posted by tmilktoast View Post
Regarding those Edge of the Empire fonts, I imagine none of you are seeing them in your browser because you probably don't have them installed on your PC.

EightBitz, do you still want me to send you those things you asked for, or were you just going to work on Parody's suggestions?
I'm working on Parody's suggestion, and I'm pretty far along with the div tags. Had a few hiccups along the way, but things are going well now.
EightBitz is offline   #80 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:23 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.