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 - Fix #873: buttons Format, Compact, and Repair not supporting
internationalization. internationalization.
- Fix #877: Some CSS styling issues when used in combination with Materialize.
## 2019-12-28, version 8.1.1 ## 2019-12-28, version 8.1.1

View File

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

View File

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

View File

@ -568,3 +568,18 @@ pre.jsoneditor-preview,
opacity: 1; 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"; @import "styles";
.jsoneditor { .jsoneditor,
.search { .jsoneditor-modal {
input { input,
height: auto; 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: inherit;
border: none; box-shadow: inherit;
box-shadow: none;
} }
} }
textarea {
height: inherit;
}
select {
display: inherit;
height: inherit;
}
label {
font-size: inherit;
font-weight: inherit;
color: inherit;
}
table { table {
border-collapse: collapse; border-collapse: collapse;
width: auto; width: auto;
} }
}
.jsoneditor td, td,
.jsoneditor th { th {
padding: 0; padding: 0;
display: table-cell; display: table-cell;
text-align: left; text-align: left;
vertical-align: inherit; vertical-align: inherit;
border-radius: inherit; border-radius: inherit;
}
} }

View File

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