Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heyfrench/as3csslib
CSS3 parser, selector and style engine for ActionScript 3.0.
https://github.com/heyfrench/as3csslib
Last synced: about 2 months ago
JSON representation
CSS3 parser, selector and style engine for ActionScript 3.0.
- Host: GitHub
- URL: https://github.com/heyfrench/as3csslib
- Owner: heyfrench
- Created: 2015-07-13T15:28:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-13T20:04:02.000Z (over 9 years ago)
- Last Synced: 2024-08-04T05:02:47.297Z (5 months ago)
- Language: ActionScript
- Homepage:
- Size: 2.08 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-actionscript-sorted - as3csslib - CSS3 parser, selector and style engine for ActionScript 3.0. (File Formats / CSS)
README
# Introduction
This library was originally written to add CSS3 selector and style support to ActionScript 3 projects. It is no longer maintained, though the selector engine and style matching are tested and very functional.
The documentation below is what was available on Google Code when the project went cold.
# CSSContext
The CSS context object is used to configure the CSS engine by defining
the main object factory (`ICSSFactory`), CSS property definitions (`IPropertyManager`),
and object-CSS views (`ICSSView`). Every CSS instance requires a context object.## Details
`CSSContext` is the base implementation of `ICSSContext` and is the leanest configuration.
`CSS3Context` is an implementation of `ICSSContext` that contains the property and shorthand
managers specific to CSS3 (background, border, font, etc.).The CSS context can be defined in one of two ways:
```as3
import com.newgonzo.web.css.*:// set it once for all future CSS instances
CSS.defaultContext = new CSS3Context();
var mycss:CSS = new CSS("p {color: #F00;}");// set it on a per-insace basis (or override the default)
var mycss:CSS = new CSS("p {color: #F00;}", new CSS3Context());
```# CSSView
A CSS view (`ICSSView`) is an object that acts as a bridge between your stylable data (XML, display list, etc.) and the CSS engine.
Everything that the CSS engine needs to know about your data it gets from the view.## Details
When the CSS engine attempts to style a node, it first gets a view for that node from the CSS context object. For example, if we're trying to
get styles for some XML node, the CSS context will return an instance of `XMLCSSView`. Views exist for XML, DisplayObjects, and arbitrary object hierarchies.