css !IMPORTANT causing style not being parsed correctly #358

Closed
yifan opened this Issue Mar 24, 2013 · 3 comments

Comments

Projects
None yet
2 participants
Contributor

yifan commented Mar 24, 2013

for example:

p {align: center!IMPORTANT;}

It will cause this style not being parsed correctly, then not applied to text. Currently I strip !IMPORTANT in NSString+CSS.m for my project. I am not a web developer so not sure how many these tags are out there.

Collaborator

odrobnik commented Mar 24, 2013

Currently CSS matching is "brute force" and does not work with "paths" and other CSS specialities. Because of this I'll implement a workaround to ignore !important when it is being encountered.

@odrobnik odrobnik added a commit that referenced this issue Mar 24, 2013

@odrobnik odrobnik Added unit test for #358 db952fd

odrobnik closed this in 59b8a03 Mar 24, 2013

@yifan yifan added a commit to yifan/DTCoreText that referenced this issue Mar 25, 2013

@odrobnik @yifan odrobnik + yifan Added unit test for #358 c22b7ec

@yifan yifan added a commit to yifan/DTCoreText that referenced this issue Mar 25, 2013

@odrobnik @yifan odrobnik + yifan Ignore !important CSS tag
fixes #358
70c7d48
Contributor

yifan commented Mar 25, 2013

potentially we could have additional dictionary for !IMPORTANT css key:value, and check against them during merging. I will take a look.

Collaborator

odrobnik commented Mar 25, 2013

Well actually we should rewrite proper CSS rule support.

Best regards
Oliver Drobnik

@Cocoanetics on Twitter and App.net
www.cocoanetics.com

On 25.03.2013, at 16:27, Yifan Zhang notifications@github.com wrote:

potentially we could have additional dictionary for !IMPORTANT css key:value, and check against them during merging. I will take a look.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment