XF 2.3 Want to change rounded corners to square corners

FTL

Well-known member
My theme is a slightly customised default theme created a long time ago by a friend. However, I'd like the corners to be square rather than rounded, so can someone please tell me which settings to adjust and the path to them?
 
Add this to extra.less template:

Code:
.block-container, .button, a.button, .blockMessage, .block-rowMessage, .block--messages .message, .block--messages .block-row, .carousel-item {
    border-radius: 0;
}
.p-nav-list .p-navEl.is-selected, .p-navgroup {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
@media (min-width: 650px) {
    .block-container:not(.block-container--noStripRadius)>:first-child,.block-topRadiusContent,.block-container:not(.block-container--noStripRadius)>.block-body:first-child>.blockLink:first-child {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>:last-child,.block-bottomRadiusContent,.block-container:not(.block-container--noStripRadius)>.block-body:last-child>.blockLink:last-child,.block-container:not(.block-container--noStripRadius)>.tabPanes:last-child>[role=tabpanel]>:last-child,.block-container:not(.block-container--noStripRadius)>.tabPanes:last-child>[role=tabpanel]>.block-body>:last-child {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>.block-body:first-child>.dataList:first-child tbody:first-child .dataList-row:first-child>.dataList-cell:first-child,.block-topRadiusContent.dataList tbody:first-child .dataList-row:first-child>.dataList-cell:first-child,.block-topRadiusContent>.dataList:first-child tbody:first-child .dataList-row:first-child>.dataList-cell:first-child,.block-container:not(.block-container--noStripRadius)>.block-body:first-child>.dataList:first-child thead:first-child .dataList-row:first-child>.dataList-cell:first-child,.block-topRadiusContent.dataList thead:first-child .dataList-row:first-child>.dataList-cell:first-child,.block-topRadiusContent>.dataList:first-child thead:first-child .dataList-row:first-child>.dataList-cell:first-child {
        border-top-left-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>.block-body:first-child>.dataList:first-child tbody:first-child .dataList-row:first-child>.dataList-cell:last-child,.block-topRadiusContent.dataList tbody:first-child .dataList-row:first-child>.dataList-cell:last-child,.block-topRadiusContent>.dataList:first-child tbody:first-child .dataList-row:first-child>.dataList-cell:last-child,.block-container:not(.block-container--noStripRadius)>.block-body:first-child>.dataList:first-child thead:first-child .dataList-row:first-child>.dataList-cell:last-child,.block-topRadiusContent.dataList thead:first-child .dataList-row:first-child>.dataList-cell:last-child,.block-topRadiusContent>.dataList:first-child thead:first-child .dataList-row:first-child>.dataList-cell:last-child {
        border-top-right-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>.block-body:first-child>.formRow:first-child>dt,.block-topRadiusContent.formRow>dt,.block-topRadiusContent>.formRow:first-child>dt {
        border-top-left-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>.block-body:first-child>.formRow:first-child>dd,.block-topRadiusContent.formRow>dd,.block-topRadiusContent>.formRow:first-child>dd {
        border-top-right-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>.block-body:last-child>.dataList:last-child tbody:last-child .dataList-row:last-child>.dataList-cell:first-child,.block-bottomRadiusContent.dataList tbody:last-child .dataList-row:last-child>.dataList-cell:first-child,.block-bottomRadiusContent>.dataList:last-child tbody:last-child .dataList-row:last-child>.dataList-cell:first-child {
        border-bottom-left-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>.block-body:last-child>.dataList:last-child tbody:last-child .dataList-row:last-child>.dataList-cell:last-child,.block-bottomRadiusContent.dataList tbody:last-child .dataList-row:last-child>.dataList-cell:last-child,.block-bottomRadiusContent>.dataList:last-child tbody:last-child .dataList-row:last-child>.dataList-cell:last-child {
        border-bottom-right-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>.block-body:last-child>.formRow:last-child>dt,.block-bottomRadiusContent.formRow>dt,.block-bottomRadiusContent>.formRow:last-child>dt {
        border-bottom-left-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>.block-body:last-child>.formRow:last-child>dd,.block-bottomRadiusContent.formRow>dd,.block-bottomRadiusContent>.formRow:last-child>dd {
        border-bottom-right-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>.block-body:last-child .formSubmitRow:not(.is-sticky)>dt,.block-container:not(.block-container--noStripRadius)>.formSubmitRow:not(.is-sticky):last-child>dt,.block-bottomRadiusContent>.formSubmitRow:not(.is-sticky)>dt {
        border-bottom-left-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>.block-body:last-child .formSubmitRow:not(.is-sticky)>dd,.block-container:not(.block-container--noStripRadius)>.formSubmitRow:not(.is-sticky):last-child>dd,.block-bottomRadiusContent>.formSubmitRow:not(.is-sticky)>dd {
        border-bottom-right-radius: 0;
    }
    .block-container:not(.block-container--noStripRadius)>.block-body:last-child .formSubmitRow:not(.is-sticky) .formSubmitRow-bar,.block-container:not(.block-container--noStripRadius)>.formSubmitRow:not(.is-sticky):last-child .formSubmitRow-bar,.block-bottomRadiusContent>.formSubmitRow:not(.is-sticky) .formSubmitRow-bar {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
}
The code above should cover the majority of it.

If you want to remove border radius from everywhere you can always use a global reset like below, but I wouldn't recommend as it can cause override headaches later. I recommend using targeted rules instead (like above) and add to it if needed.


CSS:
* {
  border-radius: 0 !important;
}
 
  • Like
Reactions: FTL
Thanks, but I'm on XF Cloud. Is this somthing I can do in the ACP, or do I have to do it on a file on the server, which I believe might be the case? I have no access to that.

Also, I'm surprised it's that complicated, I thought it would just involve changing the value of a variable in the ACP like one does to get square avatars as I've done in my forum.
 
If you want to use it, just copy and paste into the extra.less template in XF Cloud. Go to: Admin > Appearance > Templates > extra.less

As for there being a single specific setting to adjust border-radius for your entire theme, that would be theme specific and I figured you would have checked your theme settings first before asking for help here. I don't know what theme your using, nor the current admin settings it has. You can always check there first: Admin > Appearance > Styles
 
  • Like
Reactions: FTL
Thanks for the advice. I don't know much when it comes to the themes. I've been able to work a couple of things out, but that's it, hence my query here. I'll try this out soon and get back to you.

Again, it's just a modified default theme is all with colours and a handful of other settngs changed.
 
Back
Top Bottom