Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter bootstrap - how to remove gradient mixin in subclass

I want to subclass .navbar-inner in my custom theme, but I can't figure a non-hackish way to disable gradient (apart from setting both gradient colors to same color which seems dirty). Any idea how can I override (disable) a mixin from a subclass in less??

like image 868
pielgrzym Avatar asked Jul 04 '12 17:07

pielgrzym


2 Answers

That's what you need to achieve in css to override disable the gradient.

CSS:

.navbar-inner {
  background-color: #2c2c2c; 
  background-image: none;
  background-image: none;
  background-image: none;
  background-image: none;
  background-image: none;
  background-image: none;
  background-repeat: no-repeat;
  filter: none;
}

background-image: none; has to be used several times to override all the vendor prefixes.

remove gradient

like image 153
baptme Avatar answered Sep 23 '22 04:09

baptme


For SASS code: I added background-color:transparent and moved it into a mixin

@mixin override_gradient_vertical() {
  background-color:transparent;
  background-image: none;
  background-image: none;
  background-image: none;
  background-image: none;
  background-image: none;
  background-image: none;
  background-repeat: no-repeat;
  filter: none;
}

Now you just can use

@include override_gradient_vertical();
like image 35
ScotterC Avatar answered Sep 24 '22 04:09

ScotterC