Skip to content

Instantly share code, notes, and snippets.

@frankiekam
Forked from markward/autohide.css
Created April 7, 2012 09:40
Show Gist options
  • Save frankiekam/2326873 to your computer and use it in GitHub Desktop.
Save frankiekam/2326873 to your computer and use it in GitHub Desktop.
AutoHide for Editing Mode on Moodle 2.X (Mark Ward & Mark Johnson Combined CSS). Why? Well, now the "Bordered static marching ants" and "fading icons" effect by Mark Ward are combined with Mark Johnson's section-level controls on topics/weeks formats, so
/** To hide the icons we are using opacity as display:none makes
the buttons inaccessible.
FILTER attributes should apply to IE so long as the strict
doctype is served. Use Filter: none on clear to protect PNG alphas.
Tweak the top opacity values to get "ghost" icons rather than hiding them**/
.block .header .commands a img,
.path-course-view .section .content li .commands a img,
.path-course-view .section .content .summary a img.icon.edit{
opacity: 0.01;
filter: alpha(opacity=1);
-o-transition: opacity 0.5s linear 0.3s;
-moz-transition: opacity 0.5s linear 0.3s;
-webkit-transition: opacity 0.5s linear 0.3s;
transition: opacity 0.5s linear 0.3s;
}
.path-course-view .section .left.side a img,
.path-course-view .section .right.side a img,
.path-course-view .section .right.side div img
{
opacity: 0.01;
filter: alpha(opacity=1);
}
.path-course-view .section:hover .right.side img,
.path-course-view .section:hover .left.side img,
.path-course-view .section .right.side a:focus img,
.path-course-view .section .left.side a:focus img,
.ie.path-course-view .section .right.side a:active img,
.ie.path-course-view .section .left.side a:active img
{
opacity:1;
filter: none;
}
.block:hover .header .commands a img,
.block .header .commands a:focus img,
.ie .block .header .commands a:active img,
.path-course-view .section .content li:hover .commands a img,
.path-course-view .section .content li .commands a:focus img,
.ie.path-course-view .section .content li .commands a:active img,
.path-course-view .section:hover .content .summary a img.icon.edit,
.path-course-view .section .content .summary a:focus img.icon.edit,
.ie.path-course-view .section .content .summary a:active img.icon.edit{
opacity:1;
filter: none;
-o-transition: opacity 0.3s;
-moz-transition: opacity 0.3s;
-webkit-transition: opacity 0.3s;
transition: opacity 0.3s;
}
/** some feedback to tell user we are in editing mode **/
.editing.path-course-view div.content{
border: 2px #caa dotted;
box-shadow: #caa 0px 0px 10px;
}
.path-course-view .section .content .section_add_menus{
background-color: #caa;
padding: .1em 0;
}
@frankiekam
Copy link
Author

AutoHide for Editing Mode on Moodle 2.X (Mark Ward & Mark Johnson Combined CSS). Why? Well, now the "Bordered static marching ants" and "fading icons" effect by Mark Ward are combined with Mark Johnson's section-level controls on topics/weeks formats, so that the "Add a" lists and Move/Show Only/Hide links only show when hovering a section.

@markward
Copy link

Ah! Does hiding the section-level controls work ok in Internet Explorer? When I tried it the drop down lists disappeared as soon as I moved the cursor away from the launch point because IE didn't recognise I was still on the element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment