6.1 conditional css?

Forum to discuss the Web client version of Servoy.

6.1 conditional css?

Postby mboegem » Wed Jul 18, 2012 10:55 pm

Hi,

I've been playing around with the new css features in 6.1
I noticed the border-radius isn't supported by IE.

Is there a way to use conditional css as is common for 'normal' css?
Tried
Code: Select all
<!--[if !IE]> -->
      border-radius: 15px;
   <!-- <![endif]-->

But that just blocks it for all browsers... :-(
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1751
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: 6.1 conditional css?

Postby pbakker » Thu Jul 19, 2012 9:44 am

Conditional comments (which is a proprietary mechanism of IE) in Servoy StyleSheets are not supported, but why do you need them at all?

You're use-case doesn't make much sense to me, as if a version of IE doesn't support the border-radius CSS property, it'll just ignore it

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: 6.1 conditional css?

Postby mboegem » Thu Jul 19, 2012 9:42 pm

pbakker wrote:You're use-case doesn't make much sense to me, as if a version of IE doesn't support the border-radius CSS property, it'll just ignore it


Hi Paul,

if that was the case I wouldn't have started this thread.
I use a label with this styleclass:
Code: Select all
label.headers {
   border: 0px solid;
   border-color: #204A9E;

   color: #FFFFFF;
   background-image: linear-gradient(top, #204A9E, #99B4EA);
   
   margin-left: 10px;
   font-size: 14pt;
   font-weight: bold;
   font-variant: normal;
   border-radius: 15px;
}


If I use IE to display this layout, not only the border-radius is ignored, but also my background-image...
Having my font in white against a white background, this page has become unusable.

As soon as I take out the border-radius, IE will nicely show the background-image (gradient) as well.

So what exactly is ignored? The whole style class, or just that specific property of the class.
As I understand it now this seems a bug...
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1751
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: 6.1 conditional css?

Postby pbakker » Fri Jul 20, 2012 9:29 am

Hi Marc,

With the additional info you gave now, I can see where you're coming from.

I think the solution to your problem is not conditional comments, but specifying a fallback background-color in the styleclass to render a proper background color on browsers that do not support gradients.

So, if you add "background-color: red;" somewhere above the background-image property in the class, the label should have a red background if the browser cannot render the linear-gradient value for the background-image property

Hope this helps

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 9 guests

cron