New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use variables for standardized CSS color schemes in css.php (Trac #952) #952
Comments
trac user twall wrote on 39257008-06-12 This could also help in custom sizing; a single "page width" setting could be used to calculate the desired settings for dozens more width and/or margin settings, rather than having to reverse-engineer the magic values scattered throughout views/default/css.php. |
brettp wrote on 40089890-04-23 Closing in favor of the many other tickets concerning similar things. |
brettp wrote on 40089892-11-16 Actually this is a slightly different subject and is one worth keeping. |
Milestone changed to |
Title changed from |
trac user twall wrote on 40779617-06-10 One other useful variable would be $css_scope, e.g. {$css_scope} input[something-or-other] { ... } I have several elgg views that may be brought up within a page that is not the original elgg environment. I want to be able to include the full elgg CSS to style those views, without affecting the host environment (ning, for example, would go crazy if the elgg default css file were included as-is). By default the scope might be empty, or something like ".elgg", and the default page shells for elgg would put the css scope into the class of the html or body elements. |
cash wrote on 40979459-04-10 To be useful, this has to have a lot more than just a few colors. You'd need colors for text in different contexts, backgrounds in different contexts, headings, links, etc. Then themers could mix and match. I originally tried to create just a few color variables and I ran into two problems: choosing names and making the colors atomic enough to be useful. We can keep this around in case someone gets inspired, but I don't see a good way to do this. |
Milestone changed to |
ewinslow wrote on 41149240-03-18 Closing this.
|
Original ticket http://trac.elgg.org/ticket/952 on 39257002-06-28 by trac user twall, assigned to unknown.
Elgg version: 1.5
The core views/default/css.php file could make better use of abstraction. For example, the following usage is rampant:
What could be done instead, which would provide some clarity to those who don't immediately visualize hex colors:
The abstracted values could be set from an input to the css view, from the DB, or some other source. Doing so would make it much easier for a theme plugin to tweak values by changing a few of the inputs, rather than painstakingly overriding dozens of CSS selectors.
Other plugins could then make use of these CSS settings in their CSS files, which would help make them automatically integrate with new themes, without the new themes having to know about other plugins' specific CSS settings and selectors.
Currently, any plugin which attempts to match core elgg in its components' appearance must hard-code CSS values, which then must be explicitly overridden by any theme plugin.
The text was updated successfully, but these errors were encountered: