Posible CSS Selector regression #1111

Closed
karma4u101 opened this Issue Sep 13, 2011 · 4 comments

Comments

Projects
None yet
4 participants
@karma4u101
Member

karma4u101 commented Sep 13, 2011

Difference in CSS transform behaviour on attribute between 2.9.0-1/2.4-M4 and 2.4-M3
Class attribute is being added instead of replaced in some but not all elements. ( Using Html5Properties -- maybe irrelevant )

Ref: http://groups.google.com/group/liftweb/browse_thread/thread/c47929b035a3020d/120f7a2230b2dbc6?hl=en&lnk=gst&q=css+selector+transforms+unexpected+behavior#120f7a2230b2dbc6

Test snippet snippet
def test = {
//class replace on tr and td elem. acts like a [class+] on tr elem in M4
val m: Map[Integer,String] = Map((1,"a"),(2,"b")) //just to have something to trigger the behaviour, data is not used
"tbody *" #> ( "tr" #> m.map(n => ".even [class]" #> Text("odd") ) )
}

2.4-M4 css transform result

<<=====M4 is adding 'odd' attr instead of replacing 'even' with 'odd' (as in M3) <<=====On the td class attr it works fine
v1v2
v1v2

2.4-M3 result

v1v2
v1v2

template html5 code

v1v2
@indrajitr

This comment has been minimized.

Show comment Hide comment
@indrajitr

indrajitr Sep 14, 2011

Owner

Might be related to #1110

Owner

indrajitr commented Sep 14, 2011

Might be related to #1110

@karma4u101

This comment has been minimized.

Show comment Hide comment
@karma4u101

karma4u101 Sep 16, 2011

Member

I hope it is okey that I assigned it to you Peter
Peter

Member

karma4u101 commented Sep 16, 2011

I hope it is okey that I assigned it to you Peter
Peter

@karma4u101

This comment has been minimized.

Show comment Hide comment
@karma4u101

karma4u101 Sep 22, 2011

Member

As discussed and concluded in the thread you started Pete
http://groups.google.com/group/liftweb/browse_thread/thread/562e0b90657f20f7/0099392615ad3429?lnk=raot
this is not a regression.
The reason for the change is the element merging rule which kicks in on the tr element.
To accomplish what I want in M4 i should change this
"tbody *" #> ( "tr" #> m.map(n => ".even [class]" #> Text("odd") ) )
to this
"tbody *" #> (m.map(n => ".even [class]" #> Text("odd") ) )

Member

karma4u101 commented Sep 22, 2011

As discussed and concluded in the thread you started Pete
http://groups.google.com/group/liftweb/browse_thread/thread/562e0b90657f20f7/0099392615ad3429?lnk=raot
this is not a regression.
The reason for the change is the element merging rule which kicks in on the tr element.
To accomplish what I want in M4 i should change this
"tbody *" #> ( "tr" #> m.map(n => ".even [class]" #> Text("odd") ) )
to this
"tbody *" #> (m.map(n => ".even [class]" #> Text("odd") ) )

@github-importer

This comment has been minimized.

Show comment Hide comment

@ghost ghost assigned pbrant Mar 1, 2012

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment