Closed ajackson-cpi closed 7 years ago
Hi @ajackson-cpi Thanks for reporting.
Not sure I understand the problem. If it is a bug due to not well handling of name prefix or are you talking about css inheritance? If prefix problem then probably I can check and fix but inheritance is a big task.
It’s a prefix problem. I suspect you match on substring instead of breaking the “class” list into tokens and comparing those.
From: Nguyen Van Nhu notifications@github.com Reply-To: vanng822/go-premailer reply@reply.github.com Date: Saturday, June 11, 2016 at 4:46 AM To: vanng822/go-premailer go-premailer@noreply.github.com Cc: Andy Jackson andy.jackson@chargepoint.com, Mention mention@noreply.github.com Subject: Re: [vanng822/go-premailer] .content styles applied to
Hi @ajackson-cpihttps://github.com/ajackson-cpi Thanks for reporting.
Not sure I understand the problem. If it is a bug due to not well handling of name prefix or are you talking about css inheritance? If prefix problem then probably I can check and fix but inheritance is a big task.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/vanng822/go-premailer/issues/3#issuecomment-225355609, or mute the threadhttps://github.com/notifications/unsubscribe/ASYhQR6LSfylql9s2QTG3ltq2siJx84iks5qKqAEgaJpZM4IyYgJ.
This email and any attachments are intended for the sole use of the intended recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments and delete this email message and any attachments immediately.
It is goquery that do jquery like dom search so probably bug somewhere there.
Hi @ajackson-cpi Do you have a test case. I tried this and worked fine
`
<body>
<div class="content-wrap">
<div class="content">
<strong>Yes!</strong>
</div>
</div>
</body>
</html>`
CSS styles I intended only for a <div class="content"> were also getting applied to a <div class="content-wrap">
My CSS rule was: .content { padding: 0; }
Workaround: Name no class a prefix of another (a common pattern though).