lexborisov / Modest

Modest is a fast HTML renderer implemented as a pure C99 library with no outside dependencies.
GNU Lesser General Public License v2.1
732 stars 65 forks source link

Report some bugs #29

Open cg82616424 opened 7 years ago

cg82616424 commented 7 years ago

Hi @lexborisov I think, may mycss be have some bugs. I use css_low_level.c to parse and serialize some css string. after serialization, I find 2 problems.

  1. css string missed some content like:

@font-face {font-family: "iconfont"; src: url('/v2/iconfont/iconfont.eot'); /* IE9*/ src: url('/v2/iconfont/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('/v2/iconfont/iconfont.woff') format('woff'), /* chrome、firefox */ url('/v2/iconfont/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('/v2/iconfont/iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */ }

  1. some characters can not serialize like: .icon-my:before { content: "\e686"; } .icon-cascades:before { content: "\e67c"; } .icon-share:before { content: "\e6f3"; } .icon-time:before { content: "\e65f"; } .icon-ttpodicon:before { content: "\e667"; } .icon-shujulaiyuan:before { content: "\e7d4"; } changed to .icon-more::before {content: ;} .icon-myfill::before {content: ;} .icon-my::before {content: ;} .icon-cascades::before {content: ;} .icon-share::before {content: ;} .icon-time::before {content: ;} .icon-ttpodicon::before {content: ;} .icon-shujulaiyuan::before {content: ;}

the source css is from m.sh.bendibao.com/mip/130913.html inside the mip-custom tag.

lexborisov commented 7 years ago

Hi @cg82616424 ! @font-face not yet implemented. This is not difficult to do. Content is also not implemented. All this is not difficult to do, but the CSS is big, and I'm alone. I'm implementing everything.