0

zk css overriding not working on ZK5

asked 2010-01-14 19:21:16 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

Hi,

I have an override.css which overrides some of zk css in the whole app. It works on ZK3, but not on ZK5. The css itself is loaded, but apperently zk.wcs is loading after, ending high a higher priority, and overriding my override.

I moved the <style src="css/override.css" /> to the last line, and still not working.

As an example:

/* increase spaces between toolbarbuttons inside a toolbar. Note: ZK3 is .z-toolbar-button and ZK5 is z.toolbarbutton */
.z-toolbarbutton {
    margin: 0px 5px;
}

Is this a bug or a spec. change, if so, is there a work around? I played a little but couldnt make it work...

Thanks

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2010-01-14 20:04:28 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2010-01-14 20:29:11 +0800

This is my sample
it is works well

index.zul

<zk>
    <style src="css/override.css"/>
    <toolbarbutton label="click me"/>
</zk>

override.css

.z-toolbarbutton { margin: 0px 5px;  color: red;}

I use ZK5 RC2
Which version do you used ?

link publish delete flag offensive edit

answered 2010-01-14 21:10:49 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

Hi Jimmy,

I'm on FL 01/14/2010, I've tried your sample, the color is red, but the margin property is overrided by zk.wcs, and instead of 0px 5px it becomes 0px 2px, I'm testing on GC 4 beta and analyzing the source with Developer Tools. Also tested on firefox 3.5.7 with firebug.

link publish delete flag offensive edit

answered 2010-01-15 00:52:30 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

I test it on GC and FF 3.5.7 .
they are works well.
I ckeck the div.
the div's classname is z-toolbarbutton.
the margin is 0px 5px.
Which element'css will be override ?

link publish delete flag offensive edit

answered 2010-01-15 06:33:46 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

It's the div with z-toolbarbutton too.

But I'll investigate this further, might be a browser cache, or something else...

I'll post back what I find out.

Thanks for the help!

link publish delete flag offensive edit

answered 2010-01-15 07:12:54 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

Hi Jimmy,

It turns out that it was a zkgrails issue and not a zk issue.

Really sorry for wasting ur time on this one.

link publish delete flag offensive edit

answered 2010-01-17 19:06:26 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

It's not a problem at all.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-01-14 19:21:16 +0800

Seen: 1,813 times

Last updated: Jan 17 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More