-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pop open a message when user deletes an annotation
- Loading branch information
Showing
9 changed files
with
236 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,153 @@ | ||
.messageBar { | ||
--message-bar-warning-icon: url(images/messageBar_warning.svg); | ||
--closing-button-icon: url(images/messageBar_closingButton.svg); | ||
|
||
display: flex; | ||
position: relative; | ||
padding: 12px 8px 12px 0; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: flex-start; | ||
gap: 8px; | ||
align-self: stretch; | ||
|
||
border-radius: 4px; | ||
--closing-button-icon: url(images/messageBar_closingButton.svg); | ||
--message-bar-close-button-color: var(--text-primary-color); | ||
--message-bar-close-button-color-hover: var(--text-primary-color); | ||
--message-bar-close-button-border-radius: 4px; | ||
--message-bar-close-button-border: none; | ||
--message-bar-close-button-hover-bg-color: rgb(21 20 26 / 0.14); | ||
--message-bar-close-button-active-bg-color: rgb(21 20 26 / 0.21); | ||
--message-bar-close-button-focus-bg-color: rgb(21 20 26 / 0.07); | ||
|
||
@media (prefers-color-scheme: dark) { | ||
--message-bar-close-button-hover-bg-color: rgb(251 251 254 / 0.14); | ||
--message-bar-close-button-active-bg-color: rgb(251 251 254 / 0.21); | ||
--message-bar-close-button-focus-bg-color: rgb(251 251 254 / 0.07); | ||
} | ||
|
||
@media screen and (forced-colors: active) { | ||
--message-bar-close-button-color: ButtonText; | ||
--message-bar-close-button-border: 1px solid ButtonText; | ||
--message-bar-close-button-hover-bg-color: ButtonText; | ||
--message-bar-close-button-active-bg-color: ButtonText; | ||
--message-bar-close-button-focus-bg-color: ButtonText; | ||
--message-bar-close-button-color-hover: HighlightText; | ||
} | ||
|
||
display: flex; | ||
position: relative; | ||
padding: 12px 8px 12px 0; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 8px; | ||
align-self: stretch; | ||
|
||
border-radius: 4px; | ||
|
||
border: 1px solid var(--message-bar-border-color); | ||
background: var(--message-bar-bg-color); | ||
color: var(--message-bar-fg-color); | ||
|
||
> div { | ||
display: flex; | ||
padding-inline-start: 16px; | ||
align-items: flex-start; | ||
gap: 8px; | ||
align-self: stretch; | ||
padding-inline-end: 32px; | ||
|
||
&::before { | ||
content: ""; | ||
display: inline-block; | ||
width: 16px; | ||
height: 16px; | ||
mask-image: var(--message-bar-icon); | ||
mask-size: cover; | ||
background-color: var(--message-bar-icon-color); | ||
} | ||
|
||
> div { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
gap: 8px; | ||
flex: 1 0 0; | ||
|
||
.title { | ||
font-size: 13px; | ||
font-weight: 590; | ||
} | ||
|
||
.description { | ||
font-size: 13px; | ||
} | ||
} | ||
} | ||
|
||
.closeButton { | ||
position: absolute; | ||
width: 32px; | ||
height: 32px; | ||
inset-inline-end: 8px; | ||
inset-block-start: 8px; | ||
background: none; | ||
border-radius: var(--message-bar-close-button-border-radius); | ||
border: var(--message-bar-close-button-border); | ||
|
||
&::before { | ||
content: ""; | ||
display: inline-block; | ||
width: 16px; | ||
height: 16px; | ||
mask-image: var(--closing-button-icon); | ||
mask-size: cover; | ||
background-color: var(--message-bar-close-button-color); | ||
} | ||
|
||
&:is(:hover, :active, :focus)::before { | ||
background-color: var(--message-bar-close-button-color-hover); | ||
} | ||
|
||
&:hover { | ||
background-color: var(--message-bar-close-button-hover-bg-color); | ||
} | ||
|
||
&:active { | ||
background-color: var(--message-bar-close-button-active-bg-color); | ||
} | ||
|
||
&:focus { | ||
background-color: var(--message-bar-close-button-focus-bg-color); | ||
} | ||
|
||
> span { | ||
display: inline-block; | ||
width: 0; | ||
height: 0; | ||
overflow: hidden; | ||
} | ||
} | ||
} | ||
|
||
border: 1px solid var(--message-bar-border-color); | ||
background: var(--message-bar-bg-color); | ||
color: var(--message-bar-fg-color); | ||
#annotationRemovedToast { | ||
--message-bar-icon: url(images/secondaryToolbarButton-documentProperties.svg); | ||
--message-bar-icon-color: #0060DF; | ||
--message-bar-bg-color: #deeafc; | ||
--message-bar-fg-color: #15141a; | ||
--text-primary-color: #15141a; | ||
--message-bar-border-color: rgb(0 0 0 / 0.08); | ||
|
||
.undoButton { | ||
background: rgba(21, 20, 26, 0.14); | ||
border-radius: 4px; | ||
font-weight: bold; | ||
color: #15141a; | ||
border: none; | ||
padding: 8px 16px; | ||
} | ||
|
||
> div { | ||
display: flex; | ||
padding-inline-start: 16px; | ||
align-items: flex-start; | ||
gap: 8px; | ||
align-self: stretch; | ||
|
||
&::before { | ||
content: ""; | ||
display: inline-block; | ||
width: 16px; | ||
height: 16px; | ||
mask-image: var(--message-bar-warning-icon); | ||
mask-size: cover; | ||
background-color: var(--message-bar-icon-color); | ||
} | ||
|
||
> div { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
gap: 8px; | ||
flex: 1 0 0; | ||
|
||
.title { | ||
font-size: 13px; | ||
font-weight: 590; | ||
} | ||
|
||
.description { | ||
font-size: 13px; | ||
} | ||
} | ||
align-items: center; | ||
} | ||
|
||
.closeButton { | ||
position: absolute; | ||
width: 32px; | ||
height: 32px; | ||
inset-inline-end: 8px; | ||
inset-block-start: 8px; | ||
background: none; | ||
border-radius: var(--message-bar-close-button-border-radius); | ||
border: var(--message-bar-close-button-border); | ||
|
||
&::before { | ||
content: ""; | ||
display: inline-block; | ||
width: 16px; | ||
height: 16px; | ||
mask-image: var(--closing-button-icon); | ||
mask-size: cover; | ||
background-color: var(--message-bar-close-button-color); | ||
} | ||
|
||
&:is(:hover, :active, :focus)::before { | ||
background-color: var(--message-bar-close-button-color-hover); | ||
} | ||
|
||
&:hover { | ||
background-color: var(--message-bar-close-button-hover-bg-color); | ||
} | ||
|
||
&:active { | ||
background-color: var(--message-bar-close-button-active-bg-color); | ||
} | ||
|
||
&:focus { | ||
background-color: var(--message-bar-close-button-focus-bg-color); | ||
} | ||
|
||
> span { | ||
display: inline-block; | ||
width: 0; | ||
height: 0; | ||
overflow: hidden; | ||
} | ||
padding-top: 12px; | ||
} | ||
} | ||
|
||
#undoAnnotationDeleteMessage { | ||
--message-bar-bg-color: #DEEAFC; | ||
--message-bar-fg-color: #15141a; | ||
--message-bar-border-color: rgb(0 0 0 / 0.08); | ||
--message-bar-icon-color: #cd411e; | ||
--message-bar-close-button-border-radius: 4px; | ||
--message-bar-close-button-border: none; | ||
--message-bar-close-button-color: var(--text-primary-color); | ||
--message-bar-close-button-hover-bg-color: rgb(21 20 26 / 0.14); | ||
--message-bar-close-button-active-bg-color: rgb(21 20 26 / 0.21); | ||
--message-bar-close-button-focus-bg-color: rgb(21 20 26 / 0.07); | ||
--message-bar-close-button-color-hover: var(--text-primary-color); | ||
|
||
/* hacks */ | ||
position: fixed; | ||
bottom: 100px; | ||
width: 400px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
#toastContainer { | ||
position: fixed; | ||
bottom: 100px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
} |
Oops, something went wrong.