2017-12-18 06:55:32 +00:00
|
|
|
#search-replace-dialog {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
right: 64px;
|
|
|
|
min-width: 200px;
|
|
|
|
max-width: calc(100vw - 4rem);
|
|
|
|
box-sizing: border-box;
|
|
|
|
z-index: 10000;
|
2018-10-12 20:24:42 +00:00
|
|
|
background-color: var(--white);
|
|
|
|
box-shadow: 4px 5px 20px -6px var(--black-alpha-5);
|
|
|
|
border: 1px solid var(--truegray-alpha-4);
|
2017-12-18 06:55:32 +00:00
|
|
|
transition: opacity .25s;
|
|
|
|
border-top: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog:not(:focus-within):not(:hover) {
|
|
|
|
opacity: .5;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog > * {
|
|
|
|
padding-right: .75em;
|
|
|
|
display: flex;
|
|
|
|
align-items: stretch;
|
2018-10-12 20:24:42 +00:00
|
|
|
background-color: var(--truegray-alpha-1);
|
2017-12-18 06:55:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-type="content"] {
|
|
|
|
flex: 1;
|
|
|
|
display: flex;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-type="content"] > :not(:last-child) {
|
|
|
|
margin-right: .5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-type="content"] button {
|
|
|
|
align-self: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog[data-type="replace"] button svg {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-type="input-wrapper"] {
|
|
|
|
position: relative;
|
|
|
|
display: flex;
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog textarea {
|
|
|
|
resize: none;
|
|
|
|
width: min-content;
|
|
|
|
min-width: 10em;
|
|
|
|
max-width: none;
|
|
|
|
min-height: 1.3em;
|
|
|
|
max-height: 10vh;
|
|
|
|
line-height: 1.3em;
|
|
|
|
padding: .25rem .25rem .25rem .5rem;
|
|
|
|
margin: 0;
|
|
|
|
border: none;
|
2018-10-12 20:24:42 +00:00
|
|
|
background-color: var(--white);
|
2017-12-18 06:55:32 +00:00
|
|
|
font-weight: bold;
|
|
|
|
white-space: nowrap;
|
|
|
|
color: currentColor; /* use the current theme's color instead of UserAgent's CSS */
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog textarea:invalid {
|
|
|
|
box-shadow: none; /* Firefox is weird */
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog :disabled {
|
|
|
|
opacity: .5;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********** actions ****************/
|
|
|
|
|
|
|
|
#search-replace-dialog [data-type="actions"] {
|
|
|
|
flex: 0;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding-left: .5em;
|
|
|
|
opacity: .5;
|
|
|
|
transition: opacity .25s;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog:focus-within [data-type="actions"],
|
|
|
|
#search-replace-dialog [data-type="actions"]:hover {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-action] {
|
|
|
|
display: block;
|
|
|
|
padding: 2px .5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-type="actions"] a:last-child {
|
|
|
|
margin-right: -.5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********** case-sensitivity ****************/
|
|
|
|
|
|
|
|
#search-replace-dialog [data-action="case"] {
|
|
|
|
text-decoration: none;
|
|
|
|
font-weight: bold;
|
|
|
|
color: currentColor;
|
|
|
|
cursor: pointer;
|
|
|
|
padding: 0 .5em;
|
|
|
|
line-height: 20px;
|
|
|
|
display: block;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-action="case"][data-enabled]:after {
|
|
|
|
content: "";
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
position: absolute;
|
2018-10-12 20:24:42 +00:00
|
|
|
border-color: var(--darkcyan-alpha-5);
|
2017-12-18 06:55:32 +00:00
|
|
|
border-style: none none solid none;
|
|
|
|
border-width: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-action="case"]:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********** clear input ****************/
|
|
|
|
|
|
|
|
#search-replace-dialog textarea:not(:valid) + [data-type="hover"] {
|
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-type="hover"] {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 4px;
|
|
|
|
bottom: 0;
|
|
|
|
margin: 0;
|
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
|
|
|
transition: opacity .5s;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog:hover [data-type="hover"] {
|
|
|
|
opacity: 1;
|
|
|
|
pointer-events: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-action="clear"] {
|
|
|
|
padding: 3px;
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2018-10-12 20:24:42 +00:00
|
|
|
background-color: var(--white-alpha-75);
|
2017-12-18 06:55:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-type="status"] {
|
2018-10-12 20:24:42 +00:00
|
|
|
background-color: var(--truegray-alpha-2);
|
2017-12-18 06:55:32 +00:00
|
|
|
padding-top: 2px;
|
|
|
|
padding-left: .5rem;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-type="tally"] {
|
|
|
|
opacity: .5;
|
|
|
|
margin-left: 1em;
|
|
|
|
}
|
|
|
|
|
|
|
|
#search-replace-dialog [data-type="tally"]:hover {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
2018-10-12 20:24:42 +00:00
|
|
|
/*********** CodeMirror search. Shouldn't need variables ****************/
|
|
|
|
body.find-open .search-target-editor {
|
|
|
|
outline-color: darkorange !important;
|
|
|
|
}
|
2017-12-18 06:55:32 +00:00
|
|
|
|
2018-10-12 20:24:42 +00:00
|
|
|
body.find-open .cm-searching {
|
|
|
|
background-color: rgba(255, 255, 0, .4);
|
2017-12-18 06:55:32 +00:00
|
|
|
}
|
|
|
|
|
2018-10-12 20:24:42 +00:00
|
|
|
body.find-open .cm-searching.search-target-match {
|
2017-12-18 06:55:32 +00:00
|
|
|
background-color: darkorange;
|
|
|
|
color: black;
|
|
|
|
}
|
|
|
|
|
2018-10-12 20:24:42 +00:00
|
|
|
body.find-open .CodeMirror-search-match {
|
|
|
|
background: gold;
|
|
|
|
border-top: 1px solid orange;
|
|
|
|
border-bottom: 1px solid orange;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* hide default CM search highlighting */
|
|
|
|
body .cm-searching,
|
|
|
|
body .CodeMirror-search-match {
|
|
|
|
background-color: transparent;
|
|
|
|
border-color: transparent;
|
|
|
|
}
|
|
|
|
|
2017-12-18 06:55:32 +00:00
|
|
|
@media (max-width: 500px) {
|
|
|
|
#search-replace-dialog {
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
max-width: none;
|
|
|
|
}
|
|
|
|
#search-replace-dialog textarea {
|
|
|
|
min-width: 50px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 800px) {
|
|
|
|
#search-replace-dialog[data-type="replace"] {
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
max-width: none;
|
|
|
|
}
|
2017-12-18 23:48:47 +00:00
|
|
|
#search-replace-dialog[data-type="replace"] button:not(.hidden) {
|
|
|
|
display: none !important;
|
|
|
|
}
|
|
|
|
#search-replace-dialog[data-type="replace"] button.hidden {
|
|
|
|
display: block !important;
|
2017-12-18 06:55:32 +00:00
|
|
|
font-size: 0;
|
|
|
|
width: 24px;
|
|
|
|
text-align: center;
|
2017-12-18 23:48:47 +00:00
|
|
|
cursor: pointer;
|
2017-12-18 06:55:32 +00:00
|
|
|
}
|
|
|
|
#search-replace-dialog[data-type="replace"] button svg {
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
#search-replace-dialog[data-type="replace"] textarea {
|
|
|
|
min-width: 50px;
|
|
|
|
max-width: calc(50vw - 120px);
|
|
|
|
width: auto;
|
|
|
|
}
|
|
|
|
}
|