Code Monkey home page Code Monkey logo

Comments (2)

kasperisager avatar kasperisager commented on September 21, 2024

I recently backtracked a bit on this issue in 280a3b6 which changed the way style declarations are parsed. Now, parsing of supported properties is done eagerly in order to more easily support shorthand properties. Previously, when asked for a property foo, we would look for all declarations of property foo and pick the last valid declaration. With the introduction of support for sorthand properties, this became a little more tricky as the property foo could also result from a shorthand declaration such as bar. When looking for the property foo, we would therefore also have to look for the property bar and check if any such declarations result in a foo. Additionally, a declaration such as bar might also result in other properties being declared, such as baz, which we would then also have to deal with to avoid having to parse bar declarations for both foo and baz lookups.

from alfa.

kasperisager avatar kasperisager commented on September 21, 2024

I did some more investigation into this as part of #447 and have concluded that further attempts to delay parts of style resolution likely won't pay off. We need to perform at least a baseline cascade eagerly to benefit from ancestor filtering and need to also eagerly parse properties per my previous comment. The current architecture doesn't seem to support any further laziness.

from alfa.

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.