View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
10739Bug reportsTheme editorpublic2016-04-26 17:54
ReporterDenisChenu Assigned ToLouisGac 
PrioritylowSeverityminor 
Status closedResolutionfixed 
Product Version2.50.x 
Summary10739: theme css are loaded before controller or view css
Description

Try to update some "default" css from controller : example expression.css

.em-expression {
background: grey;
}

in theme : it don't work

Steps To Reproduce

Look at survey logic file source:

<link rel="stylesheet" type="text/css" href="http://limesurvey.sondages.pro/styles-public/font-awesome-43-debugmode.min.css&quot; />
<link rel="stylesheet" type="text/css" href="/tmp/assets/208a81a5/css/bootstrap.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/tmp/assets/3d4ddfaf/css/yiistrap.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://limesurvey.sondages.pro/styles/Bay_of_Many/css/lime-admin.css&quot; />
<link rel="stylesheet" type="text/css" href="http://limesurvey.sondages.pro/styles/Bay_of_Many/css/fonts.css&quot; />
<link rel="stylesheet" type="text/css" href="http://limesurvey.sondages.pro/styles/Bay_of_Many/css/statistics.css&quot; />
<link rel="stylesheet" type="text/css" href="http://limesurvey.sondages.pro/styles/Bay_of_Many/css/bootstrap-switch.min.css&quot; />
<link rel="stylesheet" type="text/css" href="http://limesurvey.sondages.pro/styles/Bay_of_Many/css/jcarousel.responsive.css&quot; />
<link rel="stylesheet" type="text/css" href="/styles/expressionlogicfile.css" />
<link rel="stylesheet" type="text/css" href="/styles/expressions.css" />

Additional Information

We need some "default" css, because if core add a new page, a new system etc ... theme must not be update each time.
But theme css must be loaded at the end.

Same for plugin (own view etc...)

Must be :
core default css
plugin css
theme css

Same can /must be applied to js

For css : move registering to footer do the job (i think).

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)160310
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Relationships

related to 10299 closedc_schmitz usertemplate preview not found 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2016-03-10 19:00

developer   ~36327

Another question

DenisChenu

DenisChenu

2016-03-10 19:02

developer   ~36328

And please : don't move expresssion.css or any other css in theme :

  • The base css (core css) give some basic for all template
  • Template can update

Some part can be moved to theme (example : surveylogicfile table color , maybe use boostrap color) but not other : iframe#dialog css is needed for all theme.

LouisGac

LouisGac

2016-03-11 13:16

developer   ~36401

why not ?

LouisGac

LouisGac

2016-03-11 13:21

developer   ~36402

By the way, the answer to the question

"why do you load the CSS in the header?",

is :
"because it was like that in 2.06" :

2014:
https://github.com/LimeSurvey/LimeSurvey/blob/b4d67861420d1f183914e50d26cdaf677a9d5cc1/application/views/admin/super/header.php

But sure, now that I know better the LS code, I see no objection to move all that to the footer.

DenisChenu

DenisChenu

2016-03-11 14:09

developer   ~36408

Why not : because : we already have issue with admin template like this:

  • Fix a css issue in "default"
  • Mustr fix (same line) in another one
  • Must fix -(same line) in another one agin

User report bug to tell : this was not fixed in mine.

Admin theme can be made elsewhere than LS core, then have "default" > theme system is really the better way.

LouisGac

LouisGac

2016-03-11 14:35

developer   ~36411

well I'm using a script to generate all the admin themes from a SASS file.

LouisGac

LouisGac

2016-03-11 14:40

developer   ~36412

but sure, we could have a default common css file.

DenisChenu

DenisChenu

2016-03-11 14:46

developer   ~36414

Then ALL them dev must update Admin template each time we add a single line of css somewhere ?

And all company who hire a dev to do an admin template must payb again when we add a litlle line of css

Etc ....

Same behaviour for Public template ?

LouisGac

LouisGac

2016-03-11 14:54

developer   ~36420

Last edited: 2016-03-11 15:08

For now, each time I update the admin template I update all of them.
We yet spoke about that :

  • The SASS part should be strictly limited to color definition (the changing part between templates)
  • All other css definition should be in a different file (that can be easy copied to all template)

That's how are working for now the front end template. I will do it for the admin theme side in a second time.

The question is : should we have a CSS core file, that end dev can't update via template ? I don't see why it would be usefull, but why not.

DenisChenu

DenisChenu

2016-03-11 15:48

developer   ~36435

All other css definition should be in a different file (that can be easy copied to all template) : no , because other people must want to have their own template without update it each time we add/update something.

CSS : Cascading Style Sheet ;

  • Core , for example : set body with to margin:0. Any other guy can easily set it to margin : 150px in template.

Really CSS is Cascading .

LouisGac

LouisGac

2016-03-15 10:22

developer   ~36490

Ok Denis, I finally just understood what you want.

Just add a css file in the config.xml.
It will be load after all the other ones.
;-)

LouisGac

LouisGac

2016-04-25 19:44

developer   ~37836

all the css load has been rewritten, using packages.

c_schmitz

c_schmitz

2016-04-26 17:54

administrator   ~37868

Version 2.50+ Build 160426 released

Issue History

Date Modified Username Field Change
2016-03-10 18:57 DenisChenu New Issue
2016-03-10 19:00 DenisChenu Note Added: 36327
2016-03-10 19:01 DenisChenu Relationship added related to 10299
2016-03-10 19:02 DenisChenu Note Added: 36328
2016-03-11 13:08 c_schmitz Priority none => high
2016-03-11 13:16 LouisGac Note Added: 36401
2016-03-11 13:21 LouisGac Note Added: 36402
2016-03-11 14:09 DenisChenu Note Added: 36408
2016-03-11 14:35 LouisGac Note Added: 36411
2016-03-11 14:40 LouisGac Note Added: 36412
2016-03-11 14:46 DenisChenu Note Added: 36414
2016-03-11 14:54 LouisGac Note Added: 36420
2016-03-11 14:54 LouisGac Note Edited: 36420
2016-03-11 15:08 LouisGac Note Edited: 36420
2016-03-11 15:08 LouisGac Note Edited: 36420
2016-03-11 15:48 DenisChenu Note Added: 36435
2016-03-15 10:22 LouisGac Note Added: 36490
2016-03-15 10:55 LouisGac Priority high => low
2016-04-25 19:44 LouisGac Note Added: 37836
2016-04-25 19:44 LouisGac Status new => resolved
2016-04-25 19:44 LouisGac Resolution open => fixed
2016-04-25 19:44 LouisGac Assigned To => LouisGac
2016-04-26 17:54 c_schmitz Note Added: 37868
2016-04-26 17:54 c_schmitz Status resolved => closed