With 5.12, the following worked:
Code: Select all
with(menuBarStyle=new mm_style()){
offclass="menubar-normal";
...
fontweight="bold";
...
This doesn't seem to work anymore (i.e. the bold part is ignored). Is there anything I'm missing?
Code: Select all
with(menuBarStyle=new mm_style()){
offclass="menubar-normal";
...
fontweight="bold";
...
ozs wrote:rawcss did fix the problem, but really this is a hack...
I don't want to speak out of turn, and I don't want to offend. But I just have to say that I don't think it was necessary to label Ruth's suggestion a "hack" and I hope she wasn't offended by it. I might have been if it had been my suggestion (but Ruth is much tougher than meRuth wrote:I don't know what you mean by a hack, rawcss is a property of the menu.
ozs wrote:...It is less flexible than the old way,... using the hack all over the place is too time consuming and error prone.
I don't know why you'd find using the rawcss property so much less flexible than using the fontweight property, or why you'd have to apply the change "all over the place" (is that what you meant by "local fix"?). The only explanation I can come up with is that you misinterpreted Ruth's suggestion to mean that you should apply rawcss as a menu item property, in every aI() definition. That would work, but it would require a lot of editing (which is what I assume you meant by "all over the place"). If that's what you thought, then I could understand your feeling about flexibility. But, I don't think that's what Ruth meant. I think she meant for you to apply rawcss as a style property. As with the fontweight property, you can apply rawcss on a per item basis, as an item property, or on a larger scale, as a style property. In fact, most style properties can also be applied as item properties (the main point being to override a global style property on an item-by-item basis). So, to implement Ruth's suggestion, you'd simply replace one line of code with another in the appropriate menu style(s), replacing fontweight="bold"; with rawcss="font-weight: bold";. That doesn't seem inflexible to me. To the contrary, it seems pretty flexible to offer more than one way to do something with relatively little code editing required.In a later reply, ozs wrote:I think your workaround is great for a local fix...
Rather than specifying a bold weight in the menu style, you could define it in the class that you're applying. I.e., You could remove fontweight=bold; from your menu style definition, and include font-weight: bold; in your .menubar-normal class definition.ozs wrote:With 5.12, the following worked:Code: Select all
with(menuBarStyle=new mm_style()){ offclass="menubar-normal"; ... fontweight="bold"; ...
In the first reply, ozs wrote:...and I believe that this is a bug. Is there a chance you will be fixing this bug?
In a later reply, ozs wrote:But in fact, the menu is ignoring a valid style in the form of fontweight="bold";.
I can understand your frustration over this. We've all been there at one time or another with various products. However, there may be a perfectly valid reason why your former approach no longer works. For example, it may be that an approach that used to work was never really intended to work that way. I've encountered this sort of thing myself. In your case, maybe using onclass and/or offclass was supposed to preclude the use of other style properties (I'm saying "maybe"... just as an example), but it just so happened that some of those properties still worked. You've gone from 5.12 to 5.69. That's a pretty big leap. Given that fontweight still seems to work for many, if not most users, perhaps it's not a bug in the menu system; perhaps you have some other coding issues that were not apparent with earlier releases of the menu system.ozs wrote:This used to work in older versions and there is no reason it shouldn't work in the latest!
You are right, they aren't very different. What I am doing is esentially "interiting" styles. Style A isn't bold, B inherits from A and makes fontweight="bold", then C inherits from B and makes it non-bold again. For one override, this isn't a big issue, but if multiple things change between A, B, C, then using rawcss becomes problematic.kevin3442 wrote:I don't know why you'd find using the rawcss property so much less flexible than using the fontweight property