Fix #877: Some CSS styling issues when used in combination with Materialize

This commit is contained in:
Jos de Jong 2020-01-04 16:05:25 +01:00
parent 0c061b33e3
commit 090d41f8d9
6 changed files with 65 additions and 16 deletions

View File

@ -7,6 +7,7 @@ https://github.com/josdejong/jsoneditor
- Fix #873: buttons Format, Compact, and Repair not supporting
internationalization.
- Fix #877: Some CSS styling issues when used in combination with Materialize.
## 2019-12-28, version 8.1.1

View File

@ -45,7 +45,7 @@ export function showTransformModal (container, json, onTransform) {
' </select>' +
' </div>' +
' <div class="jsoneditor-inline jsoneditor-jmespath-filter-value" >' +
' <input placeholder="value..." id="filterValue" />' +
' <input type="text" class="value" placeholder="value..." id="filterValue" />' +
' </div>' +
' </td>' +
' </tr>' +

View File

@ -400,6 +400,8 @@
.jsoneditor-modal select,
.jsoneditor-modal textarea,
.jsoneditor-modal input,
.jsoneditor-modal input[type="text"],
.jsoneditor-modal input[type="text"]:focus,
.jsoneditor-modal #query {
background: #ffffff;
border: 1px solid $jse-bar-border;
@ -414,6 +416,7 @@
.jsoneditor-modal option,
.jsoneditor-modal textarea,
.jsoneditor-modal input,
.jsoneditor-modal input[type="text"],
.jsoneditor-modal #query {
font-size: 10.5pt;
font-family: $jse-font;

View File

@ -567,4 +567,19 @@ pre.jsoneditor-preview,
100% {
opacity: 1;
}
}
}
// override some styles which where cleared in reset.scss
.jsoneditor-modal {
input[type="search"].selectr-input {
border: 1px solid #d3d3d3;
width: calc(100% - 4px);
margin: 2px;
padding: 4px;
box-sizing: border-box;
}
button.selectr-input-clear {
right: 8px;
}
}

View File

@ -1,24 +1,53 @@
@import "styles";
.jsoneditor {
.search {
input {
height: auto;
.jsoneditor,
.jsoneditor-modal {
input,
input:not([type]),
input[type="text"],
input[type="search"], {
height: auto;
border: inherit;
box-shadow: none;
font-size: inherit;
box-sizing: inherit;
padding: inherit;
font-family: inherit;
transition: none;
line-height: inherit;
&:focus {
border: inherit;
border: none;
box-shadow: none;
box-shadow: inherit;
}
}
textarea {
height: inherit;
}
select {
display: inherit;
height: inherit;
}
label {
font-size: inherit;
font-weight: inherit;
color: inherit;
}
table {
border-collapse: collapse;
width: auto;
}
}
.jsoneditor td,
.jsoneditor th {
padding: 0;
display: table-cell;
text-align: left;
vertical-align: inherit;
border-radius: inherit;
td,
th {
padding: 0;
display: table-cell;
text-align: left;
vertical-align: inherit;
border-radius: inherit;
}
}

View File

@ -16,6 +16,7 @@
outline: none;
margin: 1px;
line-height: 20px;
font-family: $jse-font;
}
button {