Skip to content

Commit

Permalink
Fix order of css rules
Browse files Browse the repository at this point in the history
since v1.77.7 the behaviour of compiling css from nested rules changed:
https://sass-lang.com/documentation/breaking-changes/mixed-decls/

To avoid warnings and keep the old structure of the compiled css
all properties should occur before nested rules
  • Loading branch information
nicodh committed Jul 30, 2024
1 parent 5679647 commit 832d3e1
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 53 deletions.
47 changes: 24 additions & 23 deletions scss/chat/_chat-list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@
padding: 0px 10px;
align-items: center;

.status-icon {
flex-shrink: 0;
margin-top: 2px;
margin-bottom: 2px;
}

.fresh-message-counter {
color: var(--unreadCountLabel);
background-color: var(--unreadCountBg);
text-align: center;

// For alignment with the message text
margin-top: 1px;

font-size: 9pt;
margin-left: 5px;
height: 20px;
padding: 0 5pt;
line-height: 20px;
border-radius: 10px;
font-weight: bold;
}

& > .content {
flex-grow: 1;
margin-left: 10px;
Expand Down Expand Up @@ -115,28 +138,6 @@
margin-left: 2px;
}
}
.status-icon {
flex-shrink: 0;
margin-top: 2px;
margin-bottom: 2px;
}

.fresh-message-counter {
color: var(--unreadCountLabel);
background-color: var(--unreadCountBg);
text-align: center;

// For alignment with the message text
margin-top: 1px;

font-size: 9pt;
margin-left: 5px;
height: 20px;
padding: 0 5pt;
line-height: 20px;
border-radius: 10px;
font-weight: bold;
}

&:hover,
&.context-menu-active {
Expand All @@ -145,13 +146,13 @@
}

.pseudo-chat-list-item.message-search-result {
height: 72px;
&:hover .avatars {
.small.avatar > .content {
outline-color: var(--chatListItemBgHover);
}
}

height: 72px;
.avatars {
position: relative;
height: 48px /** avatar-size + margin * 2 **/;
Expand Down
2 changes: 1 addition & 1 deletion scss/dialogs/_audit_log.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
ul {
list-style: none;
li.time {
padding-bottom: 11px;
div {
text-transform: capitalize;
border-bottom: 2px solid var(--globalText);
font-size: 15px;
font-weight: bold;
display: inline-block;
}
padding-bottom: 11px;
}

li.info {
Expand Down
2 changes: 1 addition & 1 deletion scss/dialogs/_qr-import.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
div.import-qr-code-dialog {
text-align: center;
z-index: $z-index-new-local-scope; // needed for .scan-qr-description
.qr-image-loader {
max-height: 0px;
overflow: hidden;
Expand All @@ -20,7 +21,6 @@ div.import-qr-code-dialog {
margin: 10px;
}

z-index: $z-index-new-local-scope; // needed for .scan-qr-description
}

.qr-data {
Expand Down
4 changes: 2 additions & 2 deletions scss/gallery/_attachment-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
'../images/download.svg',
var(--fullScreenMediaButtons)
);
cursor: pointer;
margin-right: 5px;

&:hover {
background-color: var(--fullScreenMediaButtons);
}
cursor: pointer;
margin-right: 5px;
}

.bp4-icon-cross {
Expand Down
10 changes: 5 additions & 5 deletions scss/gallery/_media-attachment.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@
flex-direction: row;
width: calc(100% - 5px);
padding: 5px;
align-items: center;
position: relative;

$size_width: 70px;
$date_width: 120px;

&:hover {
background: var(--galleryFileRowHover);
border-radius: 5px;
Expand Down Expand Up @@ -128,11 +133,6 @@
}
}

align-items: center;
position: relative;

$size_width: 70px;
$date_width: 120px;

& > .name {
flex-grow: 1;
Expand Down
8 changes: 4 additions & 4 deletions scss/misc/_context_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
background-color: transparent;
pointer-events: none;

&.active {
pointer-events: all;
}

// prevent double context menu on macOS
// (when using touchpad it sometimes selects the text in the context menu, and then show a native context menu on top)
user-select: none;

&.active {
pointer-events: all;
}
}

.dc-context-menu {
Expand Down
19 changes: 10 additions & 9 deletions src/renderer/components/QrReader/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,7 @@
}

.qrReaderScanLine {
@keyframes pulsating {
from {
opacity: 1;
}
to {
opacity: 0;
}
}


animation-direction: alternate;
animation-duration: 0.6s;
animation-iteration-count: infinite;
Expand All @@ -111,6 +103,15 @@
position: absolute;
right: 50px;
top: 50%;

@keyframes pulsating {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
}

.qrReaderFileInput {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/message/styles.module.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
$reaction-transition-duration: 100ms;

.message {
transition: margin-bottom ease-out $reaction-transition-duration;
&.withReactions {
margin-bottom: 10px;
}
transition: margin-bottom ease-out $reaction-transition-duration;
}

.messageFooter {
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
transition: margin-bottom ease-out $reaction-transition-duration;

&.onlyMedia {
bottom: 0;
Expand All @@ -20,7 +21,6 @@ $reaction-transition-duration: 100ms;
right: 0;
}

transition: margin-bottom ease-out $reaction-transition-duration;
&.withReactionsNoText {
margin-bottom: 10px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ export default function OnboardingScreen(props: Props) {
props.selectedAccountId
)
if (acInfo.kind === 'Unconfigured') {
await props.onUnSelectAccount()
await EffectfulBackendActions.removeAccount(props.selectedAccountId)
try {
await props.onUnSelectAccount()
EffectfulBackendActions.removeAccount(props.selectedAccountId)
} catch (error) {
log.error('error on removeAccount', error)
}
}

props.onExitWelcomeScreen()
Expand Down
6 changes: 2 additions & 4 deletions themes/dev_rocket.scss
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ div.group-image-wrapper div.group-image-edit-button {

.message {
.msg-container {
display: flex;
.msg-body {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -510,8 +511,6 @@ div.group-image-wrapper div.group-image-edit-button {
display: none;
}
}

display: flex;
}

&.incoming {
Expand All @@ -527,11 +526,10 @@ div.group-image-wrapper div.group-image-edit-button {
}

&.outgoing {
margin-left: 0;
.author-wrapper .author {
background-color: black;
}

margin-left: 0;
}

.author-wrapper {
Expand Down

0 comments on commit 832d3e1

Please sign in to comment.