[ALOY-64] Need to handle all selector types
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-19T11:52:05.000+0000 |
Affected Version/s | 2012 Sprint 14 |
Fix Version/s | 2012 Sprint 14 |
Components | XML |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Tony Lukasavage |
Created | 2012-05-22T13:37:46.000+0000 |
Updated | 2014-06-22T13:21:03.000+0000 |
Description
Currently we only support a subset of CSS selectors. We need to be able to handle child \(>\), grouping (,), siblings \(+\), and pseudo classes \(:\) as well
I thought Sizzle handled these?
It does, but not until we get the CSS from the generated parser's format into one that Sizzle can actually handle. We can select elements with
$Ti
right now with any selector, but we can't apply CSS in the same fashion yet.The core of the problem lies in the fact that we are specifying styles in CSS format, not JSON as they are used, which requires us to run them through the CSS generated parser before using them. The JSON output of the generated parser is not usable by itself, it needs to be converted to a form to which we can apply Sizzle before it's useful.
Okay understood. For pseudo selector like lang and after:content we probably need to spec out, after:content is cool but I'm not sure appropriate for Titanium API.
In light of our recent talks on CSS, the currently supported CSS notation is by id (#myId) or by class (#myClass). I'd also like to create a default, low priority selectors for
data-ti-api
types. For example:no longer using CSS