Marko Zadravec
Marko Zadravec

Reputation: 8740

Change selected color in django material library

I would like to change selected color on bottom border and text when select form field.

example can be looked at : http://materializecss.com/forms.html#select

When selecting form filed it colored green(ish)

I am using http://forms.viewflow.io/ library, and I try several thinks, but without any luck...

I try to apply theme :

  1. inside INSTALLED_APPS :

in settings.py

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'material.theme.green',
'material',
'material.frontend',
...,

]

  1. change css

I try to change css to make it work

.input-field > label:active {
    color: green;
}

.input-field > label {
    color: green;
}

It change the label but now when it is selected. (And it paint black bottom border (line) when it is selected over)

Is there a way to do this? It should be, right,...

Upvotes: 0

Views: 870

Answers (1)

Marko Zadravec
Marko Zadravec

Reputation: 8740

Actually, I discovered that it is working, and that changing theme in settings change the color of the form.

But for http://forms.viewflow.io/ library, the color schema doesn't match with the actual color. (that's why I need some time to figure it out)

The scheme (in really simplified color schemas) is:

 'material.theme.brown' --> brown
 'material.theme.yellow' --> purple
 'material.theme.lime' --> orange
 'material.theme.lightgreen' --> lime
 'material.theme.green' --> lightblue
 'material.theme.teal' --> teal
 'material.theme.blue' --> orange
 'material.theme.indigo' --> green
 ....

Upvotes: 1

Related Questions