1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Is the best way to remove rounded corners...?

Discussion in 'Styling and Customization Questions' started by Stuart Wright, Jun 27, 2013.

  1. Stuart Wright

    Stuart Wright Well-Known Member

    To add this to EXTRA.css?
    *{border-radius: 0 !important;}
    Or is there a better way?

    I ask because our designers don't like rounded corners and this removes them entirely from the site at a stroke.
    But is it the best way to do it?
    Many thanks.
     
    RoldanLT likes this.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    That's the best and easiest way.

    It's what I have in EXTRA.css.
     
  3. Stuart Wright

    Stuart Wright Well-Known Member

    Oh cool, thanks. I thought maybe it would be more efficient to actually remove the radius elements from the standard css rather than declare then and then rescind them in this way, but I guess the overhead is minimal?
     
  4. James

    James Well-Known Member

    Overhead is negligible, yeah. Also, I think using the wildcard (*) has some overhead.

    The most efficient way would be to remove the border-radius declarations in the CSS, if you have time to do that. If not, the global selector should be OK provided you're not worried about milliseconds.
     
  5. Marcus

    Marcus Well-Known Member

    Does anyone have statistics or an article on how much *{border-radius: 0 !important;} is slower than removing the radiants in CSS?
     
  6. James

    James Well-Known Member

    The speed difference is milliseconds, probably less than two milliseconds. I wouldn't worry if you want to go down that route.

    However, it's probably better to remove the radiants from existing code, it's less "hacky" and will be much more effective if you come to edit the style again later.
     
    Marcus likes this.
  7. Marcus

    Marcus Well-Known Member

    I am doing a redesign now and the goal is to make as few changes as possible to the core design. All the design changes are very time consuming, and in the end my users browse my forum for the content. So it would be better to focus on either community management or writing more products.

    So having this in mind, I guess I'll stick with *{border-radius: 0 !important;}
     
    Last edited: Jul 23, 2013
  8. MattW

    MattW Well-Known Member

    That is what I have after @Brogan 's recommendation.
     
  9. dutchbb

    dutchbb Well-Known Member

    The only thing you may experience with adding code in EXTRA.css is sometimes (especially with backgrounds) you may see the change happen as your browser loads the page. Most of the time this will not be noticeable with other elements. Personally I would not worry about it if you can't see or feel a difference, since EXTRA.css saves a lot of time.
     
    Marcus likes this.
  10. Brogan

    Brogan XenForo Moderator Staff Member

    I have found that is worst when dealing with the main page elements such as the background, header, etc.
    The page renders first using the core CSS before EXTRA.css overrides it.

    For that reason I use SPs for major elements such as that.
     
    Chris D likes this.
  11. Marcus

    Marcus Well-Known Member

    SP means Short Path?
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    Style Properties.
     
    Marcus likes this.

Share This Page