Giter VIP home page Giter VIP logo

Comments (6)

majora2007 avatar majora2007 commented on July 17, 2024

Just came to give the same report. I didn't get this exception in the previous version.

from excss.

majora2007 avatar majora2007 commented on July 17, 2024

@TylerBrinks any ideas on this regression?

from excss.

TylerBrinks avatar TylerBrinks commented on July 17, 2024

The code shouldn't have change substantially - I'm investigating. I have a guess that it's an issue with parsing children of the @page directive.

from excss.

majora2007 avatar majora2007 commented on July 17, 2024

That's also what I'm thinking. I saw another issue that seems to have traced it down to that. I noticed @page as well in the css I was processing.

I had assumed anything that couldn't be processed would be dropped, but it could be some complex logic. Thanks for taking a look into this. My epub reader relies on this library for rendering.

from excss.

TylerBrinks avatar TylerBrinks commented on July 17, 2024

Version 4.1.4 is available on NuGet.org

from excss.

majora2007 avatar majora2007 commented on July 17, 2024

Sorry to reopen, but this issue isn't fixed on v4.2.0 still. I have:

@page {
    margin-bottom: 5pt;
    margin-top: 5pt
    }

which still throws:

System.NullReferenceException: Object reference not set to an instance of an object.
   at ExCSS.PageRule.get_SelectorText()
   at ExCSS.PageRule.ToCss(TextWriter writer, IStyleFormatter formatter)
   at ExCSS.CompressedStyleFormatter.WriteJoined(StringBuilder sb, IEnumerable`1 elements, String separator, Boolean first)
   at ExCSS.CompressedStyleFormatter.ExCSS.IStyleFormatter.Sheet(IEnumerable`1 rules)
   at ExCSS.Stylesheet.ToCss(TextWriter writer, IStyleFormatter formatter)
   at ExCSS.FormatExtensions.ToCss(IStyleFormattable style, IStyleFormatter formatter)
   at ExCSS.FormatExtensions.ToCss(IStyleFormattable style)

when doing .ToCSS()

I can validate that a PageRule is created, but there are no margins.

image

Edit: This happens not only from css with Page, but you can see here a CSS which is throwing. This has made it so I can't upgrade from v4.1.0. But with the new contributors, I would really like to update to get the newest support.

from excss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.