*Visual, powerful, extensible, inexpensive, browser-based.
Welcome Guest  (  Register  |  Lost Password  )
Post
SSDN / SiteSupra 3.1 Forum / Project Exchange / Require a Module / Request for suptra track addition
  Today's Posts Users Search
 
Hiding unwanted CSS rules from style listbox of xH
Gosh Abyzow
Posted on: 2006-08-29 16:52:07
User info

Solution Provider

Groups:
Members

Posts: 8
Member No.38
Joined: 03.02.2003

In .hthtml we can use "stylePrefix" directive to make only certain styles in the xHTML editor available to a content manager. For example, the following directive

 
CODE
'stylePrefix'     => '.my'

should make all styles with names starting with ".my" appear in the xHTML "Styles" listbox. However, imagine if I define such rules:

 
CODE
.myStyle { font-size: 80%; }
.myStyle td { padding:10px; vertical-align:top; }
.myStyle p { margin:0px; }

quite realistic situation. But the result might be puzzling - in the style list of the xHTML editor the following "styles" will be shown: 

CODE
myStyle
myStyle TD
myStyle P

So in fact all the rules/cascades will be displayed. I find this quite confusing.

Before this bug is fixed by noble SiteSupra support, I just wanted to post a simple workaround I've occasionally found for this issue. Just add "body" for all the rules you want to hide from that xHTML style listbox:

CODE
.myStyle { font-size: 80%; }
body .myStyle td { padding:10px; vertical-align:top; }
body .myStyle p { margin:0px; }

CSS will still work fine, but "myStyle TD" and "myStyle P" disappear from the style list :)

just my 2 cents...

regards,
-=gosh=-

 
There are 5 people online in the past 15 minutes: 0 Members, 5 Guests
Members:
We have 2060 registered members
© Vide Infra Grupa SIA
Terms of Use
Contacts