From 950463f3a9fab207d24f9d3971f00125da319cfb Mon Sep 17 00:00:00 2001 From: jos Date: Wed, 10 Jan 2018 22:30:33 +0100 Subject: [PATCH] Oops fixed broken css of Mode Menu --- src/jsoneditor/components/jsoneditor.css | 53 +++++++++ src/jsoneditor/components/jsoneditor.scss | 127 +++++++++++----------- 2 files changed, 116 insertions(+), 64 deletions(-) diff --git a/src/jsoneditor/components/jsoneditor.css b/src/jsoneditor/components/jsoneditor.css index c7839dc..340cc70 100644 --- a/src/jsoneditor/components/jsoneditor.css +++ b/src/jsoneditor/components/jsoneditor.css @@ -374,6 +374,59 @@ div.jsoneditor-menu-panel-right { max-width: 100%; } /******************************* Action Menu **********************************/ +div.jsoneditor-actionmenu { + position: absolute; + box-sizing: border-box; + z-index: 99999; + top: 20px; + left: 18px; + /* 20px - 2px where 2px half the difference between 24x24 icons of the menu and the 20x20 icons of the editor */ + background: white; + border: 1px solid #d3d3d3; + box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3); } + +div.jsoneditor-actionmenu.jsoneditor-actionmenu-top { + top: auto; + bottom: 20px; } + +div.jsoneditor-modemenu.jsoneditor-modemenu { + top: 26px; + left: 0; } + +div.jsoneditor-menu-item { + line-height: 0; + font-size: 0; } + +button.jsoneditor-menu-button { + width: 136px; + height: 24px; + padding: 0; + margin: 0; + line-height: 24px; + background: transparent; + border: transparent; + display: inline-block; + box-sizing: border-box; + cursor: pointer; + color: #4d4d4d; + font-size: 10pt; + font-family: arial, sans-serif; + text-align: left; } + +button.jsoneditor-menu-button:hover, +button.jsoneditor-menu-button:focus { + color: #1A1A1A; + background-color: #f5f5f5; + outline: none; } + +button.jsoneditor-menu-button.jsoneditor-selected { + color: white; + background-color: #ee422e; } + +button.jsoneditor-menu-default { + width: 104px; + /* 136px - 32px */ } + /******************************* Floating Menu **********************************/ div.jsoneditor-node-container { position: relative; diff --git a/src/jsoneditor/components/jsoneditor.scss b/src/jsoneditor/components/jsoneditor.scss index 3bedeed..fcd322c 100644 --- a/src/jsoneditor/components/jsoneditor.scss +++ b/src/jsoneditor/components/jsoneditor.scss @@ -396,76 +396,75 @@ div.jsoneditor-menu-panel-right { /******************************* Action Menu **********************************/ -// TODO: cleanup old ActionMenu css -//div.jsoneditor-actionmenu { -// position: absolute; -// box-sizing: border-box; -// z-index: 99999; -// top: 20px; -// left: 18px; /* 20px - 2px where 2px half the difference between 24x24 icons of the menu and the 20x20 icons of the editor */ -// background: white; -// -// border: 1px solid #d3d3d3; -// box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3); -//} -// -//div.jsoneditor-actionmenu.jsoneditor-actionmenu-top { -// top: auto; -// bottom: 20px; -//} -// -//div.jsoneditor-modemenu.jsoneditor-modemenu { -// top: 26px; -// left: 0; -//} -// -//div.jsoneditor-menu-item { -// line-height: 0; -// font-size: 0; -//} -// -//button.jsoneditor-menu-button { -// width: 136px; -// height: 24px; -// padding: 0; -// margin: 0; -// line-height: 24px; -// -// background: transparent; -// border: transparent; -// display: inline-block; -// box-sizing: border-box; -// -// cursor: pointer; -// color: #4d4d4d; -// -// font-size: 10pt; -// font-family: arial, sans-serif; -// text-align: left; -//} -// -//button.jsoneditor-menu-button:hover, -//button.jsoneditor-menu-button:focus { -// color: $black; -// background-color: #f5f5f5; -// outline: none; -//} -// -//button.jsoneditor-menu-button.jsoneditor-selected { -// color: white; -// background-color: #ee422e; -//} -// -//button.jsoneditor-menu-default { -// width: 104px; /* 136px - 32px */ -//} +div.jsoneditor-actionmenu { + position: absolute; + box-sizing: border-box; + z-index: 99999; + top: 20px; + left: 18px; /* 20px - 2px where 2px half the difference between 24x24 icons of the menu and the 20x20 icons of the editor */ + background: white; + + border: 1px solid #d3d3d3; + box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3); +} + +div.jsoneditor-actionmenu.jsoneditor-actionmenu-top { + top: auto; + bottom: 20px; +} + +div.jsoneditor-modemenu.jsoneditor-modemenu { + top: 26px; + left: 0; +} + +div.jsoneditor-menu-item { + line-height: 0; + font-size: 0; +} + +button.jsoneditor-menu-button { + width: 136px; + height: 24px; + padding: 0; + margin: 0; + line-height: 24px; + + background: transparent; + border: transparent; + display: inline-block; + box-sizing: border-box; + + cursor: pointer; + color: #4d4d4d; + + font-size: 10pt; + font-family: arial, sans-serif; + text-align: left; +} + +button.jsoneditor-menu-button:hover, +button.jsoneditor-menu-button:focus { + color: $black; + background-color: #f5f5f5; + outline: none; +} + +button.jsoneditor-menu-button.jsoneditor-selected { + color: white; + background-color: #ee422e; +} + +button.jsoneditor-menu-default { + width: 104px; /* 136px - 32px */ +} // //button.jsoneditor-menu-expand { // width: 32px; // float: right; // border-left: 1px solid #e5e5e5; //} -// + //span.jsoneditor-icon { // float: left; // width: 24px;