I'd like to get the colours from my database and put it directly into the css page. I don't want to put them as additional tag into the php. If possible, I'd like to read directly from css... Is that possible? I'm using php + mySQL + css + html 5.... The reason is because, in the future, I'd like to add different skins for the same php and I want to be free to change completely the design. Any clue? THANK YOU IN ADVANCE
Asked
Active
Viewed 41 times
0
-
possible duplicate of [How do i run PHP inside CSS](http://stackoverflow.com/questions/12367134/how-do-i-run-php-inside-css) – Kevin Brechbühl Aug 30 '14 at 17:17
-
I don't think so because I don't want to change the values from the PHP. Actually, I'm doing like this. I just wanna know if possible to read the information directly from CSS. I mean, without any modification of php with tags like 'style' – Gaby Aug 30 '14 at 17:27
-
the referenced answer describes how you can add php into a css file. Without php you can't read anything from the database. So if you want to do this, then you need what is described within the referenced answer. – Kevin Brechbühl Aug 30 '14 at 17:29
1 Answers
1
I think you should look at Sass. If you want to the change colors you can define them as variables and easily change everything at once.

lukadante3
- 97
- 1
- 4
-
-
For whom might interest I found this and.... it works!!! http://librosweb.es/css_avanzado/capitulo_6/variables_en_las_hojas_de_estilos.html – Gaby Aug 31 '14 at 08:19