Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting rid of all the rounded corners in Twitter Bootstrap

I love Twitter Bootstrap 2.0 - I love how it's such a complete library... but I want to make a global modification for a very boxy-not-round site, which is to get rid of all the rounded corners in Bootstrap...

That's a lot of CSS to chug through. Is there a global switch, or what would be the best way to find and replace all the rounded's?

like image 651
ina Avatar asked Mar 16 '12 17:03

ina


People also ask

How do you get rid of rounded corners?

Right-click anywhere on the screen and select Refresh. This should successfully disable the rounded corners in your operating system.

How will you remove the border from the top of a div using Bootstrap class?

Use the border-top-0 class to remove the top border from an element.

Why use rounded corners UI?

Rounded corners are more effective for maps and diagrams because they allow our eyes to easily follow lines “as it suits better to the natural movement of the head and eyes respectively” [5]. Sharp corners throw your eyes off the path of the line so you end up experiencing abrupt pauses when the line changes direction.


1 Answers

I set all element's border-radius to "0" like this:

* {   border-radius: 0 !important; } 

As I'm sure I don't want to overwrite this later I just use !important.

If you are not compiling your less files just do:

* {   -webkit-border-radius: 0 !important;      -moz-border-radius: 0 !important;           border-radius: 0 !important; } 

In bootstrap 3 if you are compiling it you can now set radius in the variables.less file:

@border-radius-base:        0px; @border-radius-large:       0px; @border-radius-small:       0px; 

In bootstrap 4 if you are compiling it you can disable radius alltogether in the _custom.scss file:

$enable-rounded:   false; 
like image 182
BrunoS Avatar answered Sep 21 '22 07:09

BrunoS