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 ??

<?php  Loader::element('header_required'); ?>
        <?php global $c; if ($c->isEditMode()) { ?>
      <style type="text/css">
         .overlay{
            display:none;
         }
        </style>
      <?php } ?>

chrismodlao
 
chrismodlao replied on at Permalink Reply
chrismodlao
Hi,

So finaly i did this :
<header id="header" class="alt <?php echo ($c->isEditMode() ? 'ineditmode' : ''); ?>">

This add the class ineditmode to my header
And then in the CSS i did move down my header block using this :
.ineditmode{top:100px;}

Not sure that's the best solution but it works.

Cheers
Gondwana replied on at Permalink Reply
Gondwana
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...
JohntheFish replied on at Permalink Reply
JohntheFish
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:
<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.
JohntheFish replied on at Permalink Reply
JohntheFish