This is a migrated thread and some comments may be shown as answers.

CSS Reset applied to decorated text fields after skinning

1 Answer 109 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Chris Marisic
Top achievements
Rank 1
Chris Marisic asked on 21 Sep 2009, 01:43 PM
I use the Compass framework for CSS design at the start of my css file I have a global style reset applied. This occurs on line 1 of the very first style sheet in my mark up. As it's meant to be applied first and then overridden by any style afterward. It is just in a .css file linked in as a stylesheet in my header tag.

However it seems that on text fields (or possible all controls that are decorated) that the RadForm decorator is inserting it's CSS before my reset so half of the CSS applied to the textboxes is ruined since margins and padding are all changed.

I can resolve the problem by removing the table altering reset portion so I definitly verified that it is caused by it however why is it being caused by it? Is there a setting for the decorator that will tell it to make sure to apply it self last?

Also why is the documentation for the RadFormDecorator almost non existent when you view the telerik help online?

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 23 Sep 2009, 06:20 AM
Hi Chris Marisic,

Yes, you are right - some of the CSS of RadFormDecorator is applied before anything else - we create a <style /> tag with JavaScript, and then add some properties in it in order to ensure smoother styling, and especially to prevent the original controls being shown prior to skinning. The only possible solution is the one you've found - to remove the properties that cause the trouble in the reset file. If you need these, however you may apply them only to CSS classes that you actually use on the page. CSS reset is a good approach, but as it uses global selectors rather than classes its use is not recommended on pages with third party controls, and the CSS reset file has to be adapted to work properly on such pages.

Kind regards,
Martin Ivanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
FormDecorator
Asked by
Chris Marisic
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or