Comments (6)
Just came to give the same report. I didn't get this exception in the previous version.
from excss.
@TylerBrinks any ideas on this regression?
from excss.
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.
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.
Version 4.1.4 is available on NuGet.org
from excss.
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.
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)
- Janky at-rule catches FillDeclaration in an infinite loop HOT 3
- Can't parse this code, waiting for a long, long time HOT 5
- Font size rule doesn't allow functions HOT 3
- Changelog for Releases HOT 7
- ClipPath property is empty
- ListSelector should be a public class HOT 2
- Certain comments is breaking the parser and hex colours are converted to rgb colours HOT 3
- NullReferenceException in ToCss() in v0.4.2
- Parsing z-index values outside of int range throws an OverflowException HOT 5
- Selector with attribute matching throws exception on WebGL build HOT 1
- JustifyContent always parses to empty string
- Everything's that's useful is internal HOT 1
- Flex: auto should be parsed to "flex: 1 1 auto" instead of "flex: 0 1 auto"
- animation-name is being converted to lower case which affects the resulting css
- Discarding of "invalid" property values - way to keep in parsed object? HOT 1
- justify-content update breaks the following css (Starting with 4.2.3) HOT 1
- Copyright placeholder in your license.txt file HOT 1
- Support for *-block and *-inline properties
- opacity can not parse when is 84%
- How to use selectors? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from excss.