admidio icon indicating copy to clipboard operation
admidio copied to clipboard

Using CSS preprocessor to build themes

Open jochen-ac opened this issue 9 years ago • 3 comments

Currently admidio loads basic bootstrap css and theme specific css. This works fine for the basic layout but it is realy hard to customize for own layouts, especially for the tones of bootstarp definitions.

Bootstrap ships with Less and SASS files, where you can define variables (e.g. for colors), nesting or import. With only adjusting a few variables it is very easy for users to create their own theme. Those .less or .scss files can be precompiled to css an provided by the server (better performance) or on client side by Javascript (allowes to use an onscreen customizing tool - maybe later ).

Less themes to be easier to learn, SASS provides more functionality. Because bootstrap switches the development to SASS for V4, we should prefer this as well using the SCSS syntax.

jochen-ac avatar Jan 04 '16 14:01 jochen-ac

part of: https://github.com/Admidio/admidio/issues/49

ximex avatar Jan 04 '16 16:01 ximex

I've created a feature branch with a first sass implementation:

  • replaced all colors with vars
  • replaced linear-gradients with @mixins
  • replaced 768px / 767px with vars

jochen-ac avatar Jan 06 '16 20:01 jochen-ac

maybe this also helps: https://github.com/ximex/admidio/commit/cd2e4f69c9e088c095f455c5f5bd0a65c2797fe4

ximex avatar Jan 06 '16 20:01 ximex