From jira-events at lists.jboss.org Thu Feb 16 14:51:36 2012 Content-Type: multipart/mixed; boundary="===============0005440050158647519==" MIME-Version: 1.0 From: Viacheslav Kabanovich (JIRA) To: jbosstools-issues at lists.jboss.org Subject: [jbosstools-issues] [JBoss JIRA] (JBIDE-10127) Resolve selector in open-on of style class in VPE Date: Thu, 16 Feb 2012 14:51:36 -0500 Message-ID: <2077982375.6866.1329421896630.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1008310898.69435.1320798645231.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com --===============0005440050158647519== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://issues.jboss.org/browse/JBIDE-10127?page=3Dcom.atlassian.jira= .plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D12667224#= comment-12667224 ] = Viacheslav Kabanovich commented on JBIDE-10127: ----------------------------------------------- I have attached css specification. It contains a lot of features unknown to= us yet. = For example, compare: {code} div p {code} -

is some descendant of

{code} div * p {code} -

is a grandchild or later descendant of

{code} div > p {code} -

is a child of

I could not find an exact algorithm of resolution at a first glance, only p= rinciple 'browser will always let the most specific style rule win'; but mo= st important is that the 'fight' between rules goes for each style attribut= e. Let's modify our example: {code} div p input.styleA {color: #CC00FF; background: #0000FF} [title=3D"y"] p input.styleA {color: #00CCFF} {code} {code}

= {code} The second rule wins the battle for 'color' attribute, but it does not defi= ne 'background' attribute, and cannot fight for it, so that background will= be taken from the first rule. That means, that open-on for style class may= need to show more than one option. = > Resolve selector in open-on of style class in VPE > ------------------------------------------------- > > Key: JBIDE-10127 > URL: https://issues.jboss.org/browse/JBIDE-10127 > Project: Tools (JBoss Tools) > Issue Type: Feature Request > Components: jsp/jsf/xml source editing > Affects Versions: 3.3.0.M3 > Reporter: Viacheslav Kabanovich > Assignee: Victor Rubezhny > Fix For: 3.3.0.Beta1 > > Attachments: css2.pdf > > > EXECUTE: Create style sheet: > {code} > .styleA {color: #FF0000} > .styleA .styleB {color: #FF8000} > div.styleA {color: #FF0080} > div[title=3D"x"].styleA {color: #0000FF} > p input.styleA {color: #CCAA00} > div p input.styleA {color: #CC00FF} > [title=3D"y"] p input.styleA {color: #00CCFF} > {code} > EXECUTE: Create html: > {code} > > > Hello! = > > > = >

> .styleA {color: #FF0000} >

= >

> .styleA {color: #FF0000} >
> .styleA .styleB {color: #FF8000} >

>
> div.styleA {color: #FF0080} >
= >
> div[title=3D"x"].styleA {color: #0000FF} >
= >

> >

>
>

> >

>
= >
>
>

> >

>
>
= > > > {code} > ASSERT: Style opened at each class=3D"styleA" should be the same as text = value in element. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.jboss.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============0005440050158647519==--