Skip to content

Commit

Permalink
Merge pull request #2599 from yougotwill/theming_hotfixes
Browse files Browse the repository at this point in the history
Theming hotfixes
  • Loading branch information
Bilb authored Nov 10, 2022
2 parents f2e8fbd + 2bca956 commit 0794ede
Show file tree
Hide file tree
Showing 21 changed files with 47 additions and 101 deletions.
76 changes: 0 additions & 76 deletions stylesheets/_emoji.scss

This file was deleted.

4 changes: 2 additions & 2 deletions stylesheets/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ html {
height: 100%;
// Default theme is Classic Dark
background-color: #1b1b1b;
font-size: 14px;
}

body {
Expand All @@ -14,7 +15,6 @@ body {
width: 100%;
margin: 0;
font-family: $session-font-default;
font-size: 14px;
letter-spacing: 0.3px;
}

Expand Down Expand Up @@ -102,7 +102,7 @@ a {
.message {
-webkit-user-select: text;
user-select: text;
max-width: 35em;
max-width: 35rem;
}

.dot {
Expand Down
4 changes: 2 additions & 2 deletions stylesheets/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

.module-avatar {
display: block;
margin-bottom: 1em;
margin-bottom: 1rem;
}

.avatar-center {
Expand All @@ -52,7 +52,7 @@
.section-conversations-container {
display: flex;
flex-direction: row;
margin-inline-end: 3em;
margin-inline-end: 3rem;
align-items: center;

h4 {
Expand Down
4 changes: 2 additions & 2 deletions stylesheets/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
position: relative;
max-width: 350px;
margin: 100px auto;
padding: 1em;
padding: 1rem;
background-color: var(--modal-background-content-color);
border-radius: var(--border-radius);
overflow: auto;
Expand All @@ -23,7 +23,7 @@

/* remove scroll bars */
.loki-dialog .add-moderators-dialog .content {
padding: 1.1em;
padding: 1.1rem;
}

.session-modal {
Expand Down
4 changes: 2 additions & 2 deletions stylesheets/_modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@

.session-button {
width: 160px;
margin: 1em auto;
margin: 1rem auto;
}
}

Expand Down Expand Up @@ -957,7 +957,7 @@
font-size: 14px;

overflow: hidden;
height: 2.4em;
height: 2.4rem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
Expand Down
2 changes: 1 addition & 1 deletion stylesheets/_session_signin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
font-size: 14px;
font-weight: 700;
line-height: 14px;
padding-top: 2em;
padding-top: 2rem;
text-align: center;
}

Expand Down
1 change: 0 additions & 1 deletion stylesheets/manifest.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// Components
@import 'modal';
@import 'lightbox';
@import 'emoji';
@import 'mentions';
@import 'avatar';

Expand Down
2 changes: 1 addition & 1 deletion ts/components/AboutView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const StyledContent = styled.div`
img {
padding: 12px;
margin-top: 1em;
margin-top: 1rem;
}
a {
Expand Down
4 changes: 2 additions & 2 deletions ts/components/DebugLogView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const StyledContent = styled.div`
height: 100%;
.session-button {
margin: 1em auto 1em 0;
padding: 1em;
margin: 1rem auto 1rem 0;
padding: 1rem;
width: fit-content;
}
Expand Down
4 changes: 2 additions & 2 deletions ts/components/basic/YourSessionIDPill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { UserUtils } from '../../session/utils';

const StyledPillDividerLine = styled.div`
border-bottom: 1px solid var(--border-color);
line-height: 0.1em;
line-height: 0.1rem;
flex-grow: 1;
height: 1px;
align-self: center;
`;

const StyledPillSpan = styled.span`
padding: 5px 15px;
padding: 6px 15px 5px;
border-radius: 50px;
color: var(--text-primary-color);
border: 1px solid var(--border-color);
Expand Down
2 changes: 1 addition & 1 deletion ts/components/conversation/Emojify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ export const Emojify = (props: Props): JSX.Element => {
default:
}

return <span style={{ fontSize: `${size}em`, userSelect: 'inherit' }}>{rendered}</span>;
return <span style={{ fontSize: `${size}rem`, userSelect: 'inherit' }}>{rendered}</span>;
};
10 changes: 7 additions & 3 deletions ts/components/conversation/SessionFileDropzone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const DropZoneContainer = styled.div`
`;

const DropZoneWithBorder = styled.div`
border: dashed 4px var(--primary-color);
background-color: var(--message-link-preview-background-color);
border: dashed 4px var(--file-dropzone-border-color);
background-color: var(--file-dropzone-background-color);
position: absolute;
top: 0;
bottom: 0;
Expand All @@ -29,7 +29,11 @@ export const SessionFileDropzone = () => {
<DropZoneContainer>
<DropZoneWithBorder>
<Flex container={true} justifyContent="space-around" height="100%" alignItems="center">
<SessionIcon iconColor="var(--primary-color)" iconSize={'max'} iconType="circlePlus" />
<SessionIcon
iconColor="var(--file-dropzone-border-color)"
iconSize={'max'}
iconType="circlePlus"
/>
</Flex>
</DropZoneWithBorder>
</DropZoneContainer>
Expand Down
4 changes: 3 additions & 1 deletion ts/components/conversation/composition/EmojiQuickResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import { SearchIndex } from 'emoji-mart';
import { searchSync } from '../../../util/emoji.js';

const EmojiQuickResult = styled.span`
display: flex;
align-items: center;
width: 100%;
padding-inline-end: 20px;
padding-inline-start: 10px;
`;
const EmojiQuickResultIcon = styled.span`
padding-inline-end: 20px;
padding-inline-start: 10px;
font-size: 1.4em;
font-size: 1.4rem;
`;
const EmojiQuickResultText = styled.span``;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const StyledReadableMessage = styled(ReadableMessage)<{
display: flex;
align-items: center;
width: 100%;
letter-spacing: 0.03em;
letter-spacing: 0.03rem;
padding: var(--margins-xs) var(--margins-lg) 0;
&.message-highlighted {
Expand Down
5 changes: 3 additions & 2 deletions ts/components/icon/SessionNotificationCount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ type Props = {
const StyledCountContainer = styled.div<{ shouldRender: boolean }>`
position: absolute;
font-size: 18px;
line-height: 1.2;
top: 27px;
right: 8px;
padding: 0 6px;
left: 28px;
padding: 1px 4px;
opacity: 1;
display: flex;
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion ts/components/leftpane/MessageRequestsBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const StyledUnreadCounter = styled.div`
margin-left: var(--margins-sm);
min-width: 20px;
height: 20px;
line-height: 25px;
line-height: 20px;
display: flex;
flex-direction: row;
align-items: center;
Expand Down
5 changes: 4 additions & 1 deletion ts/themes/classicDark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const classicDark: ThemeColorVariables = {
'--button-icon-stroke-selected-color': 'var(--text-primary-color)',

'--conversation-tab-background-color': 'var(--background-primary-color)',
'--conversation-tab-background-hover-color': THEMES.CLASSIC_DARK.COLOR2,
'--conversation-tab-background-hover-color': THEMES.CLASSIC_DARK.COLOR3,
'--conversation-tab-background-selected-color': THEMES.CLASSIC_DARK.COLOR3,
'--conversation-tab-background-unread-color': THEMES.CLASSIC_DARK.COLOR2,
'--conversation-tab-text-color': 'var(--text-secondary-color)',
Expand Down Expand Up @@ -153,4 +153,7 @@ export const classicDark: ThemeColorVariables = {
'--call-buttons-icon-disabled-color': 'var(--text-primary-color)',
'--call-buttons-dropdown-color': 'var(--text-primary-color)',
'--call-buttons-dropdown-shadow': '0 0 4px 0 var(grey-color)',

'--file-dropzone-background-color': 'var(--message-link-preview-background-color)',
'--file-dropzone-border-color': 'var(--primary-color)',
};
3 changes: 3 additions & 0 deletions ts/themes/classicLight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,7 @@ export const classicLight: ThemeColorVariables = {
'--call-buttons-icon-disabled-color': 'var(--disabled-color)',
'--call-buttons-dropdown-color': 'var(--text-primary-color)',
'--call-buttons-dropdown-shadow': '0 0 4px 0 var(grey-color)',

'--file-dropzone-background-color': 'var(--message-link-preview-background-color)',
'--file-dropzone-border-color': 'var(--text-primary-color)',
};
3 changes: 3 additions & 0 deletions ts/themes/oceanDark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,7 @@ export const oceanDark: ThemeColorVariables = {
'--call-buttons-icon-disabled-color': THEMES.OCEAN_DARK.COLOR7!,
'--call-buttons-dropdown-color': 'var(--text-primary-color)',
'--call-buttons-dropdown-shadow': '0 0 4px 0 var(grey-color)',

'--file-dropzone-background-color': 'var(--message-link-preview-background-color)',
'--file-dropzone-border-color': 'var(--primary-color)',
};
3 changes: 3 additions & 0 deletions ts/themes/oceanLight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,7 @@ export const oceanLight: ThemeColorVariables = {
'--call-buttons-icon-disabled-color': 'var(--disabled-color)',
'--call-buttons-dropdown-color': 'var(--text-primary-color)',
'--call-buttons-dropdown-shadow': '0 0 4px 0 var(grey-color)',

'--file-dropzone-background-color': 'var(--message-link-preview-background-color)',
'--file-dropzone-border-color': 'var(--text-primary-color)',
};
4 changes: 4 additions & 0 deletions ts/themes/variableColors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ export type ThemeColorVariables = {
'--call-buttons-icon-disabled-color': string;
'--call-buttons-dropdown-color': string;
'--call-buttons-dropdown-shadow': string;

/* File Dropzone */
'--file-dropzone-background-color': string;
'--file-dropzone-border-color': string;
};

export function loadThemeColors(variables: ThemeColorVariables) {
Expand Down

0 comments on commit 0794ede

Please sign in to comment.