Materialize: Color the tabs

Created on 18 Jul 2015  路  2Comments  路  Source: Dogfalo/materialize

Is there a way to color the tabs without editing/changing the css file

so just by adding classes in the class="" section

<ul class="tabs">
        <li class="tab col s3"><a href="#test1">Test 1</a></li>
        <li class="tab col s3"><a class="active" href="#test2">Test 2</a></li>
        <li class="tab col s3 disabled"><a href="#test3">Disabled Tab</a></li>
        <li class="tab col s3"><a href="#test4">Test 4</a></li>
      </ul>

I want to change the background color of the tabs, and the accent color of the tab, in all states, active, current and unselected.

so for example

<li class="tab col s3 black white-text tab-accent-red"><a href="#test1">Test 1</a></li>

and for active (selected tab)

<li class="tab col s3 red white-text tab-accent-white"><a href="#test1">Test 1</a></li>

something like that, is that possible?

All 2 comments

No there is no way to do that. Adding that requires the addition of many CSS classes, my recommendation would be to try Sass.

<div class="col s12 orange">
  <ul class="tabs">
    <li class="tab col s3 orange"><a class="white-text active" href="#portfolio_all">Wszystko</a></li>
    <li class="tab col s3 orange"><a class="white-text" href="#test1">Loga</a></li>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

cope picture cope  路  3Comments

lpgeiger picture lpgeiger  路  3Comments

hartwork picture hartwork  路  3Comments

ericlormul picture ericlormul  路  3Comments

ruslandzhumaev picture ruslandzhumaev  路  3Comments