Portal Engine
Version 3.x > Portal Engine > CSS style manipulation in Design mode for EditableText View modes: 
User avatar
Member
Member
Mufasa - 8/4/2008 10:09:30 AM
   
CSS style manipulation in Design mode for EditableText
We have a web site that has a dark background for the body, but has elements over it that give it that 'page' look with a white background.

The problems is that when editing a text region in Design mode, since they are in <IFRAME>s, they use the <BODY> background color, so the black text is unreadable.

What is the best way to be able to specify proper CSS values in this case? I noticed an "HTML editor css stylesheet" property in the Behavior section of the web part, but does that mean we have to copy over (and maintain copies) of the whole CSS file just to change one attribute? Or is this value for something else? (Not sure as I didn't find any documentation on this parameter...)

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 8/5/2008 3:46:04 AM
   
RE:CSS style manipulation in Design mode for EditableText
Hi Mufasa,

I would recommend you to duplicate your CSS stylesheet and change the body background colour to white in the copy. There is the possibility to change the CSS stylesheet of editable regions in: Site Manager -> Sites -> Edit your site -> Editor CSS stylesheet. You could assign the new one with the white background.
I hope it will be helpful for you.

Best Regards,
Helena Grulichova

User avatar
Member
Member
Mufasa - 8/5/2008 10:31:59 AM
   
RE:CSS style manipulation in Design mode for EditableText
It's extra cut & pasting, but it does work. Thanks.

But in the future, it should be an _additional_ CSS file instead of just an alternate style sheet, I think. It's pretty easy to override CSS styles. Especially if you tag it with the DesignMode class (that it looks like you used to use in some previous version?).

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/6/2008 4:47:36 AM
   
RE:CSS style manipulation in Design mode for EditableText
Hello Mufasa,

The css style sheets are saved in the database in the table CMS_CssStylesheet, not in a file. It is helpful for the export of the items. To you other question, we used this approach in every version. There was no change made.

Best Regards,
Boris Pocatko

User avatar
Member
Member
Mufasa - 8/6/2008 10:51:37 AM
   
RE:CSS style manipulation in Design mode for EditableText
Okay. That's fine that they're stored in the database. My point remains.

It should allow an additional CSS BLOB, or [CMS_CssStylesheet] row, or whatever you want to call it if you don't want to call it a file. So, don't allow a replacement CSS style sheet, but an additional one that could use CSS classes, IDs, !important tags, whatever to override settings without having to copy & paste the entire base CSS into a second stylesheet.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/7/2008 2:33:09 AM
   
RE:CSS style manipulation in Design mode for EditableText
Hello Mufasa,

I discussed this request with our developer, which is in charge of developing the stylesheet deployment. We think, it is an interesting suggestion and we will consider it as an option in the next version.


Best Regards,
Boris Pocatko

User avatar
Member
Member
Mufasa - 8/7/2008 9:48:26 AM
   
RE:CSS style manipulation in Design mode for EditableText
Cool. Thanks.