SyntaxErr on <h1> with !important
See original GitHub issueFeeding the following into transform()
results in a SyntaxErr
:
<style type="text/css">
h1 { border:1px solid black }
p { color:red;}
</style>
<p>Hey</p>
<h1 style="display: block;font-family: Helvetica;font-size: 26px;font-style: normal;font-weight: bold;line-height: 100%;letter-spacing: normal;margin-top: 0;margin-right: 0;margin-bottom: 10px;margin-left: 0;text-align: left;color: #202020 !important;">Some Stuff</h1>
Results in:
SyntaxErr: PropertyValue: Missing token for production Choice(ColorValue, Dimension, URIValue, Value, variable, MSValue, CSSCalc, function): ('CHAR', '!', 1, 230)
Removing the !important
from the inline style on the H1 allows it to be inlined as expected.
Issue Analytics
- State:
- Created 8 years ago
- Comments:20 (17 by maintainers)
Top Results From Across the Web
Sass syntax error issue [duplicate] - css - Stack Overflow
I just started SASS studying and i met a problem. When i set a variable and wanted to use it, i got an...
Read more >HTML or CSS Syntax Error - Off Topic - Codecademy Forums
Using <mark></mark> in a heading is redundant. The <h2></h2> gives it importance. That combinator is a descendant selector. with no space ...
Read more >syntax error, unexpected '{' in C:\xampp\htdocs\code\contact ...
items. The error means that it came across '{' when it wasn't ready - missing '}' and more than one is missing.
Read more >Syntax Error Due to Incorrect Generated HTML File #11 - GitHub
Running mkdocs build reverts it back to code and so syntax errors start occurring again. Attaching my yml file for reference: site_name: My...
Read more >jQuery and Ajax Tutorial
The error script simply returns false and stops working with no clue at all! You need a debugger to catch syntax error for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For your information, Gmail does need
!important
for certain things such asdisplay:none
. But that apparently breaks Outlook: https://github.com/peterbe/premailer/issues/150That may happen to work in some browsers, but is it to the spec? I’m under the impression it is not technically valid HTML/CSS…
Regardless you probably don’t ever want to use inline !important in emails: https://www.campaignmonitor.com/blog/email-marketing/2010/05/outlook-2007-and-the-inline-important-declaration/
On Oct 2, 2016 5:56 AM, “Christof” notifications@github.com wrote: