Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

css !IMPORTANT causing style not being parsed correctly #358

Closed
yifan opened this Issue · 3 comments

2 participants

@yifan

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.

@Cocoanetics
Owner

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.

@yifan yifan referenced this issue from a commit in yifan/DTCoreText
@Cocoanetics Added unit test for #358 c22b7ec
@yifan yifan referenced this issue from a commit in yifan/DTCoreText
@Cocoanetics Ignore !important CSS tag
fixes #358
70c7d48
@yifan

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

@Cocoanetics
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.