CSS Reset applied to decorated text fields after skinning

2 posts, 0 answers
  1. Chris Marisic
    Chris Marisic avatar
    30 posts
    Member since:
    Sep 2009

    Posted 21 Sep 2009 Link to this post

    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?
  2. Martin
    Admin
    Martin avatar
    585 posts

    Posted 23 Sep 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top