Rhym / silverstripe-cms-theme

Theme for the Silverstripe CMS
https://packagist.org/packages/ryanpotter/silverstripe-cms-theme
MIT License
39 stars 21 forks source link

Transparent grouped sub menu #15

Closed camexapps closed 7 years ago

camexapps commented 7 years ago

Hi Ya,

Loving the new v1 update (very clean). I just noticed when in SS 3.5.X (not sure about earlier ones) whilst using the Grouped Menu (silverstripe-grouped-cms-menu) system. When editing a page, it forces the side menu to collapse. The problem is, when trying to hover over a grouped menu item, the background is transparent, which can make it rather difficult as there can be sub menu items that the client may want to access.

Screen shot below for clarification (ignore the pixellated page names)

test :

camexapps commented 7 years ago

Adding to this..

It looks like the 'collapsed' menu also removes your custom CSS of the following:

.cms-menu .cms-menu-list li.children .grouped-cms-menu:after

So, the 'icon(s)' you have setup for the grouped areas are removed.

Thinking out loud here, but the silverstripe-grouped-cms-menu system comes built in with the ability to specific the icon for the group(s), which when used, adds the prefix of 'icon-' apparently:

LeftAndMain:
  menu_groups:
    Content:
      icon: 'cmspagescontroller'
      - CMSPagesController
      - AssetAdmin

So theoretically could we look at doing such as:

LeftAndMain:
  menu_groups:
    Content:
      icon: ' fa fa-file-text-o'
      - CMSPagesController
      - AssetAdmin

Have tried this, but looks like you have your own template override setup which would override the function?

Rhym commented 7 years ago

Damn collapsible menu. I actually made it so that shouldn't show, but I guess something is being overwritten. I'll take a look now.

Rhym commented 7 years ago

@camexapps Give it a go now.

camexapps commented 7 years ago

Exellent, the only issue is if there is a logo. It seems to get cut off a bit. I did see this bit of the admin CSS that just needs to be overwritten:

.cms-menu.collapsed .cms-logo {
    height: 28px;
    padding: 12px 0 11px;
}

Should become something like?

.cms-menu.collapsed .cms-logo {
    height: auto;
    padding: 12px 0 11px;
}
Rhym commented 7 years ago

Sweet, should be sweet now. I appreciate the code, but you can just say if anything's amiss, it's just a case of a million DOM nodes, and a stupid cascade that cause issues.

camexapps commented 7 years ago

Hmm, not sure if just me, but I have reinstalled again/cleared cache, but looks like the compiled CSS does not contain that fix?

Rhym commented 7 years ago

@camexapps was this fixed in the end?

camexapps commented 7 years ago

Hey @Rhym , not sure if you saw this message:

Hmm, not sure if just me, but I have reinstalled again/cleared cache, but looks like the compiled CSS does not contain that fix?

Rhym commented 7 years ago

Seems to be for me. Are you using 1.0.5?

screen shot 2017-04-06 at 11 05 21