fix: add theming for find/search panel Search panel (#1174)
Co-authored-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
1 parent
45c52e3571
commit
94d7f0dc16
2 files changed
+119
-1
No files matched your search
@@ -333,3 +333,52 @@ export default class TheEditor extends Mixins(BaseMixin) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .ͼ1 .cm-panel.cm-search *:focus:not(.focus-visible) {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
::v-deep .ͼ1 .cm-panel.cm-search input[type='checkbox'] {
|
||||
width: 2.2em;
|
||||
height: 2.2em;
|
||||
color: dodgerblue;
|
||||
vertical-align: middle;
|
||||
-webkit-appearance: none;
|
||||
border: 10px;
|
||||
outline: 0;
|
||||
flex-grow: 0;
|
||||
border-radius: 4px;
|
||||
background: var(--v-toolbar-base);
|
||||
transition: background 300ms;
|
||||
cursor: pointer;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
/* Pseudo element for check styling */
|
||||
|
||||
::v-deep .ͼ1 .cm-panel.cm-search input[type='checkbox']::before {
|
||||
content: '';
|
||||
color: transparent;
|
||||
display: block;
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
border-radius: inherit;
|
||||
border: 2px;
|
||||
background-color: transparent;
|
||||
background-size: contain;
|
||||
box-shadow: inset 0 0 0 1px #ccd3d8;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Checked */
|
||||
|
||||
::v-deep .ͼ1 .cm-panel.cm-search input[type='checkbox']:checked {
|
||||
background-color: var(--color-primary);
|
||||
}
|
||||
|
||||
::v-deep .ͼ1 .cm-panel.cm-search input[type='checkbox']:checked::before {
|
||||
box-shadow: none;
|
||||
background-color: var(--color-primary);
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E %3Cpath d='M15.88 8.29L10 14.17l-1.88-1.88a.996.996 0 1 0-1.41 1.41l2.59 2.59c.39.39 1.02.39 1.41 0L17.3 9.7a.996.996 0 0 0 0-1.41c-.39-.39-1.03-.39-1.42 0z' fill='%23fffff'/%3E %3C/svg%3E");
|
||||
}
|
||||
</style>
|
||||
@@ -14,7 +14,6 @@ const mainsailEditor = EditorView.theme(
|
||||
color: '#d4d4d4',
|
||||
backgroundColor: ui.background,
|
||||
},
|
||||
|
||||
'.cm-activeLine.cm-line': {
|
||||
caretColor: '#d4d4d4 !important',
|
||||
},
|
||||
@@ -37,6 +36,76 @@ const mainsailEditor = EditorView.theme(
|
||||
'.cm-selectionMatch': {
|
||||
backgroundColor: '#add6ff26',
|
||||
},
|
||||
|
||||
'.cm-button': {
|
||||
'font-family': 'Roboto,sans-serif',
|
||||
'font-weight': '500',
|
||||
'font-size': '.675rem',
|
||||
'letter-spacing': '0.0892857143em',
|
||||
'vertical-align': 'middle',
|
||||
padding: '0.3em 1em',
|
||||
'border-radius': '4px',
|
||||
'border-width': '0',
|
||||
color: 'var(--color-primary)',
|
||||
'background-color': 'var(--v-secondary-darken2)',
|
||||
'background-image': 'none!important',
|
||||
'text-transform': 'uppercase',
|
||||
'text-indent': '0.0892857143em',
|
||||
'text-aling': 'left',
|
||||
},
|
||||
|
||||
'.cm-textfield:focus': {
|
||||
'border-color': 'var(--color-primary)!important',
|
||||
},
|
||||
|
||||
'.cm-textfield:focus-visible': {
|
||||
'border-color': 'var(--color-primary)!important',
|
||||
},
|
||||
|
||||
'.cm-textfield::placeholder': {
|
||||
'text-transform': 'uppercase',
|
||||
},
|
||||
'.cm-panel.cm-search label': {
|
||||
'font-weight': '500',
|
||||
'font-family': 'Roboto,sans-serif',
|
||||
'letter-spacing': '0.0892857143em',
|
||||
'text-transform': 'uppercase',
|
||||
'font-size': '12px',
|
||||
'white-space': 'pre',
|
||||
color: 'var(--v-primary-base)',
|
||||
},
|
||||
|
||||
'.cm-panel.cm-search [name=close]': {
|
||||
'font-family': 'Roboto,sans-serif',
|
||||
'text-transform': 'uppercase',
|
||||
'font-size': '200%',
|
||||
'white-space': 'pre',
|
||||
color: 'var(--color-primary)',
|
||||
'padding-right': '5px',
|
||||
'padding-top': '5px',
|
||||
},
|
||||
|
||||
'.cm-button:hover': {
|
||||
'background-color': 'var(--v-secondary-lighten1)',
|
||||
'background-image': 'none!important',
|
||||
'transition-duration': '0.5s',
|
||||
'transition-timing-function': 'cubic-bezier(1.2,0,.2,1)',
|
||||
},
|
||||
|
||||
'.cm-textfield': {
|
||||
'font-family': 'Roboto,sans-serif',
|
||||
'vertical-align': 'middle',
|
||||
'font-size': '.675rem',
|
||||
border: '1px solid silver',
|
||||
backgroundColor: ui.background,
|
||||
padding: '.3em .1em',
|
||||
'padding-left': '0.6em',
|
||||
'border-radius': '0.2em',
|
||||
},
|
||||
|
||||
'.cm-panels': {
|
||||
'background-color': 'var(--v-toolbar-base)',
|
||||
},
|
||||
},
|
||||
{ dark: true }
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user