stylesheet - How and when are CSS rules applied to a display hierarchy? -


Is there a simple implementation of open source or CSS that can be applied in arbitrary performance hierarchy? I am trying to create one for the Flash display hierarchy in AS3.

I am curious about the process used to apply CSS styles to a display hierarchy. I think that some or all selectors are added, removed, or restored in the entire display list every time a display object, as well as when events occur, such as focus changes, such as the existence of selectors such as "First-hair" and pseudo-selector such as ": Focus".

In the initial application of styles, should the entire display list scan an element, apply style, or all items should be sorted together with up-front and specific rule categories at one time? Or something like that

I'm really looking for a good general resource on a real implementation.

Update: I'm probably looking for some levels, but I do not know that this is the state of the art: "Graded interventions provide a simpler, the only way to understand CSS 2.0 specifications. It also suggests that the obstacle solution provides a natural implementation technique. Each element should be prepared by a variable in each property's property and appointment document. Obstacles on these variables are generated from browser capabilities, from the default layout behavior arising from the type of element, from the document tree structure, and the application of style rules. The documents are determined by finding solutions to these obstacles. Which question raises how and how to solve the obstacles.

@Trinco, About HTML5 Rocks:

Hey ...

The webcars only throws a global switch when any sibling selector encounters and disables style sharing for the whole document when it is present. This includes like the selectors and selectors: First-child and: The last child.

This is one way to handle it, Slaggamer to kill a fly, I do not want to use those people, selector, sometimes, Qualified

Very useful Is:

After parsing the style sheet, the rules are added to many hash maps according to the selector. Tag name by name of the class, tag name by name of class and a normal map ... if the selector is an id, the rule id will be added to the map, if it is a square then it will be added to the class map etc. It's easy to match manipulation rules. There is no need to look into every announcement: We can remove the relevant rules for an element from the map. This eliminates 95 +% of the customization rules so that they are not considered even during the matching process (4.1).

and @boltkkk:

In general, complex selectors are matched correctly to the left (these adaptations of the course For secondary), evaluating each sequence of simple selectors and proceeding through each coordinator to do so.

context


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -