Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant set Table or Cell width % because of template processing #1424

Open
MarksWizard opened this issue Jul 20, 2024 · 3 comments
Open

Cant set Table or Cell width % because of template processing #1424

MarksWizard opened this issue Jul 20, 2024 · 3 comments

Comments

@MarksWizard
Copy link

MarksWizard commented Jul 20, 2024

Trying to add the following HTML breaks because it picks up the width % as a template. Is there any way to make it keep the % as text like I would do with <font size=\"4\">? Sadly, passing the whole section as %STYLE% template doesn't fix the issue either.

<style> 
html {font-family: Helvetica; display: inline; margin: auto 0; text-align: center;}
table {width: 100%; text-align: center;} 
td {width: 50%; text-align: center; padding: 0 20px;}
</style>
@MarksWizard
Copy link
Author

MarksWizard commented Jul 20, 2024

I found a solution in issue #1249 . Adding an extra % fixed the issue in my case.

<style> 
html {font-family: Helvetica; display: inline; margin: auto 0; text-align: center;}
table {width: 100%%; text-align: center;} 
td {width: 50%%; text-align: center; padding: 0 20px;}
</style>

@munkerench
Copy link

I would suggest making the delimiter a char 3 and allowing the value to be passed in as a param to the processor. One character really limits the capability. Much more flexible. if the strings or too flexible are a concern, store them in an enum, or limit them to some set of chars like ! @ # $ % ^ & *.

@georgepapas123
Copy link

georgepapas123 commented Oct 17, 2024

I second munkerench suggestion.
My problematic html was width: 100%; height: 100%;
which was picked up as parameter "; height: 100", it took me a while to realize why the page did not behave as expected.
My solution was to use instead width: 100vw; height: 100vh; but specifying the delimiter would solve this type of problem once and for all. If a set of chars is to be used I suggest some rarely used chars like: ~ or |
Please consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants