خرید بک لینک

Vote count: 0

I'm building a site which will have no border radius on any element, and rather than using outline: 0; multiple times in my stylesheet I'm trying to use the * selector to apply outline: 0; to everything;

* {
  -moz-appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  outline: 0;
  outline: none;
  border-radius:0;
}

This CSS works on some elements such as input fields but not buttons.

I am using bootstrap and then including my own stylesheet afterwards. There are no other instances of border-radius in my stylesheet.

Why are there round borders and outlines like this?input fields are styled but buttons are not

asked 5 mins ago

1 Answer

Vote count: 0

This is due to specificity. The * selector itself has a specificity score of 0, 0, 0.

Buttons with focus in Bootstrap have the following selector:

.btn:focus { ... }

This has a specificity score of 0, 1, 1, meaning this declaration will override the * declaration no matter where in the stylesheet its placed.

answered 48 secs ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 10 فروردين 1395 ساعت: 15:33

صفحه بندی