Modifying Style.Css in Edit Mode
Permalink
This code line below works on Concrete 5.6 but seems not on the new version : Concrete 5.7
Any help would be nice as i cant find anything about this ??
Any help would be nice as i cant find anything about this ??
<?php Loader::element('header_required'); ?> <?php global $c; if ($c->isEditMode()) { ?> <style type="text/css"> .overlay{ display:none; } </style> <?php } ?>
That seems fairly clever to me!
This mightn't help, but have a look at para 13 here:
http://documentation.concrete5.org/developers/designing-for-concret...
This mightn't help, but have a look at para 13 here:
http://documentation.concrete5.org/developers/designing-for-concret...
Differentiating edit mode in css is such a common function that perhaps the core should help everyone by providing a standard edit mode flag class added to the document body or outermost wrapper.
Like we have CCM_EDIT_MODE in javascript, when a page is edited the core could set:
The same class could also be used within the dashboard for editing stacks, but applied purely to the stack and not the whole page.
Blocks and themes could then use the provided flag class to negate troublesome z-index or positioning styles that argue with edit mode. it could also be used in jQuery selectors and perhaps lead to a cleaner alternative than testing for CCM_EDIT_MODE in some scripts.
Good theme and block designers already implement edit-mode specific behaviours and css where necessary, but currently everyone has to implement it themselves and re-invent it in slightly different ways.
Like we have CCM_EDIT_MODE in javascript, when a page is edited the core could set:
<body class="ccm-edit-mode">
The same class could also be used within the dashboard for editing stacks, but applied purely to the stack and not the whole page.
Blocks and themes could then use the provided flag class to negate troublesome z-index or positioning styles that argue with edit mode. it could also be used in jQuery selectors and perhaps lead to a cleaner alternative than testing for CCM_EDIT_MODE in some scripts.
Good theme and block designers already implement edit-mode specific behaviours and css where necessary, but currently everyone has to implement it themselves and re-invent it in slightly different ways.
I opened an issue on Github
https://github.com/concrete5/concrete5/issues/4381...
https://github.com/concrete5/concrete5/issues/4381...
So finaly i did this :
This add the class ineditmode to my header
And then in the CSS i did move down my header block using this :
Not sure that's the best solution but it works.
Cheers