Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
92005b1
Fix event tiles to smoothly resize with font.
JorikSchellekens Mar 31, 2020
e2aef3a
Fix pills.
JorikSchellekens Apr 3, 2020
334f529
Scale room tile heights.
JorikSchellekens Apr 6, 2020
e034420
Scale read receipt images
JorikSchellekens Apr 6, 2020
5113723
Fix avatar alignment for room state events
JorikSchellekens Apr 6, 2020
3f56ed3
Use a function to convert to rem.
JorikSchellekens Apr 6, 2020
ff1544b
Fix read receipt horizontal spacing at scale
JorikSchellekens Apr 6, 2020
b921159
Fix room header vertical alignment
JorikSchellekens Apr 6, 2020
cef6868
Resize room list scroll section.
JorikSchellekens Apr 6, 2020
f59bd53
Resize toggle switches with font
JorikSchellekens Apr 7, 2020
633c6f6
Fix settings when scaling up
JorikSchellekens Apr 7, 2020
0fe0d72
lint
JorikSchellekens Apr 7, 2020
aac90e4
Room memebers avatars scale
JorikSchellekens Apr 7, 2020
969f0e9
Commuity seleciton bar vertical alignment scale fix
JorikSchellekens Apr 7, 2020
997fe62
FIx lanugage selection alignment at scale.
JorikSchellekens Apr 7, 2020
18db25f
Fix test
JorikSchellekens Apr 7, 2020
fd25170
lint test
JorikSchellekens Apr 7, 2020
352ae55
Fix community line height
JorikSchellekens Apr 7, 2020
6338325
Use rem instead of em.
JorikSchellekens Apr 14, 2020
c7c9493
Use font-variable instead of rem
JorikSchellekens Apr 14, 2020
5dc7703
Undo superfluous delete
JorikSchellekens Apr 14, 2020
a0b610c
Skinnier pills are easier to swallow
JorikSchellekens Apr 14, 2020
41fd9ee
FIx unread count
JorikSchellekens Apr 16, 2020
7502c2d
Scale user photo upload with font size
JorikSchellekens Apr 16, 2020
c3ba7a8
Tweak read receipt remainder text
JorikSchellekens Apr 16, 2020
669562b
Extra right padding in user pills
JorikSchellekens Apr 21, 2020
a772d95
Remove redundent padding property and use em
JorikSchellekens Apr 27, 2020
b4dcd50
Use camel case on import
JorikSchellekens Apr 27, 2020
b567b95
Lint
JorikSchellekens Apr 27, 2020
c995e2e
Fix info avatar
JorikSchellekens Apr 27, 2020
00c0212
Revert previous fix
JorikSchellekens Apr 27, 2020
55084e9
Really fix info avatar
JorikSchellekens Apr 27, 2020
6606771
Small fixes
JorikSchellekens Apr 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions res/css/_font-sizes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

$font-1px: 0.067rem;
$font-2px: 0.133rem;
$font-3px: 0.200rem;
$font-4px: 0.267rem;
$font-5px: 0.333rem;
$font-6px: 0.400rem;
$font-7px: 0.467rem;
$font-8px: 0.533rem;
$font-9px: 0.600rem;
$font-10px: 0.667rem;
Expand Down Expand Up @@ -60,4 +67,5 @@ $font-49px: 3.267rem;
$font-50px: 3.333rem;
$font-51px: 3.400rem;
$font-52px: 3.467rem;
$font-88px: 5.887rem;
$font-400px: 26.667rem;
2 changes: 1 addition & 1 deletion res/css/structures/_RoomSubList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ limitations under the License.

.mx_RoomSubList_badge > div {
flex: 0 0 auto;
border-radius: 8px;
border-radius: $font-16px;
font-weight: 600;
font-size: $font-12px;
padding: 0 5px;
Expand Down
6 changes: 3 additions & 3 deletions res/css/structures/_TagPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ limitations under the License.
height: 100%;
}
.mx_TagPanel .mx_TagPanel_tagTileContainer > div {
height: 40px;
height: $font-40px;
padding: 10px 0 9px 0;
}

Expand Down Expand Up @@ -110,13 +110,13 @@ limitations under the License.

.mx_TagPanel .mx_TagTile.mx_TagTile_selected::before {
content: '';
height: 56px;
height: calc(100% + 16px);
background-color: $accent-color;
width: 5px;
position: absolute;
left: -15px;
border-radius: 0 3px 3px 0;
top: -8px; // (56 - 40)/2
top: -8px; // (16px / 2)
}

.mx_TagPanel .mx_TagTile.mx_AccessibleButton:focus {
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/avatars/_MemberStatusMessageAvatar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
.mx_MessageComposer_avatar .mx_BaseAvatar {
padding: 2px;
border: 1px solid transparent;
border-radius: 15px;
border-radius: 100%;
}

.mx_MessageComposer_avatar .mx_BaseAvatar_initial {
Expand Down
6 changes: 3 additions & 3 deletions res/css/views/context_menus/_TopLeftMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ limitations under the License.
.mx_AccessibleButton::after {
mask-repeat: no-repeat;
mask-position: 0 center;
mask-size: 16px;
mask-size: $font-16px;
position: absolute;
width: 16px;
height: 16px;
width: $font-16px;
height: $font-16px;
content: "";
top: 5px;
left: 14px;
Expand Down
2 changes: 2 additions & 0 deletions res/css/views/elements/_Dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ limitations under the License.
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
display: inline-flex;
align-items: center;
}

.mx_Dropdown_option div {
Expand Down
40 changes: 22 additions & 18 deletions res/css/views/elements/_RichText.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
.mx_RoomPill,
.mx_GroupPill,
.mx_AtRoomPill {
border-radius: 16px;
display: inline-block;
height: 20px;
line-height: $font-20px;
padding-left: 5px;
display: inline-flex;
align-items: center;
vertical-align: middle;
border-radius: $font-16px;
line-height: $font-15px;
padding-left: 0;
}

a.mx_Pill {
Expand All @@ -21,6 +22,18 @@ a.mx_Pill {
max-width: calc(100% - 1ch);
}

.mx_Pill {
padding: $font-1px;
padding-right: 0.4em;
}

/* More specific to override `.markdown-body a` color */
.mx_EventTile_content .markdown-body a.mx_GroupPill,
.mx_GroupPill {
color: $accent-fg-color;
background-color: $rte-group-pill-color;
}

/* More specific to override `.markdown-body a` text-decoration */
.mx_EventTile_content .markdown-body a.mx_Pill {
text-decoration: none;
Expand All @@ -31,7 +44,6 @@ a.mx_Pill {
.mx_UserPill {
color: $primary-fg-color;
background-color: $other-user-pill-bg-color;
padding-right: 5px;
}

.mx_UserPill_selected {
Expand All @@ -45,7 +57,6 @@ a.mx_Pill {
.mx_MessageComposer_input .mx_AtRoomPill {
color: $accent-fg-color;
background-color: $mention-user-pill-bg-color;
padding-right: 5px;
}

/* More specific to override `.markdown-body a` color */
Expand All @@ -55,15 +66,6 @@ a.mx_Pill {
.mx_GroupPill {
color: $accent-fg-color;
background-color: $rte-room-pill-color;
padding-right: 5px;
}

/* More specific to override `.markdown-body a` color */
.mx_EventTile_content .markdown-body a.mx_GroupPill,
.mx_GroupPill {
color: $accent-fg-color;
background-color: $rte-group-pill-color;
padding-right: 5px;
}

.mx_EventTile_body .mx_UserPill,
Expand All @@ -77,8 +79,10 @@ a.mx_Pill {
.mx_GroupPill .mx_BaseAvatar,
.mx_AtRoomPill .mx_BaseAvatar {
position: relative;
left: -3px;
top: 2px;
display: inline-flex;
align-items: center;
border-radius: 10rem;
margin-right: 0.24rem;
}

.mx_Markdown_BOLD {
Expand Down
32 changes: 16 additions & 16 deletions res/css/views/elements/_ToggleSwitch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ limitations under the License.

.mx_ToggleSwitch {
transition: background-color 0.20s ease-out 0.1s;
width: 48px;
height: 24px;
border-radius: 14px;

width: $font-44px;
height: $font-20px;
border-radius: 1.5rem;
padding: 2px;

background-color: $togglesw-off-color;
position: relative;
opacity: 0.5;

display: flex;
flex-direction: row;
flex: 0 0 auto;
align-items: center;
}

.mx_ToggleSwitch_enabled {
Expand All @@ -35,19 +42,12 @@ limitations under the License.

.mx_ToggleSwitch_ball {
transition: left 0.15s ease-out 0.1s;
margin: 2px;
width: 20px;
height: 20px;
border-radius: 20px;
width: $font-20px;
height: $font-20px;
border-radius: $font-20px;
background-color: $togglesw-ball-color;
position: absolute;
top: 0;
}

.mx_ToggleSwitch_on > .mx_ToggleSwitch_ball {
left: 23px; // 48px switch - 20px ball - 5px padding = 23px
}

.mx_ToggleSwitch:not(.mx_ToggleSwitch_on) > .mx_ToggleSwitch_ball {
left: 2px;
.mx_ToggleSwitch_on {
flex-direction: row-reverse;
}
6 changes: 3 additions & 3 deletions res/css/views/right_panel/_UserInfo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ limitations under the License.
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
width: 100% !important;
height: 100% !important;
}

.mx_UserInfo_avatar .mx_BaseAvatar_initial {
Expand All @@ -109,7 +109,7 @@ limitations under the License.
justify-content: center;

// override the calculated sizes so that the letter isn't HUGE
font-size: 56px !important;
font-size: 6rem !important;
width: 100% !important;
transition: font-size 0.5s;
}
Expand Down
9 changes: 5 additions & 4 deletions res/css/views/rooms/_Autocomplete.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
}

.mx_Autocomplete_Completion_pill {
border-radius: 17px;
height: 34px;
padding: 0px 5px;
box-sizing: border-box;
border-radius: 2rem;
height: $font-34px;
padding: 0.4rem;
display: flex;
user-select: none;
cursor: pointer;
Expand All @@ -42,7 +43,7 @@
}

.mx_Autocomplete_Completion_pill > * {
margin: 0 3px;
margin-right: 0.3rem;
}

/* styling for common completion elements */
Expand Down
13 changes: 5 additions & 8 deletions res/css/views/rooms/_BasicMessageComposer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,19 @@ limitations under the License.

&.mx_BasicMessageComposer_input_shouldShowPillAvatar {
span.mx_UserPill, span.mx_RoomPill {
padding-left: 21px;
position: relative;

// avatar psuedo element
&::before {
position: absolute;
left: 2px;
top: 2px;
content: var(--avatar-letter);
width: 16px;
height: 16px;
width: $font-16px;
height: $font-16px;
margin-right: 0.24rem;
background: var(--avatar-background), $avatar-bg-color;
color: $avatar-initial-color;
background-repeat: no-repeat;
background-size: 16px;
border-radius: 8px;
background-size: $font-16px;
border-radius: $font-16px;
text-align: center;
font-weight: normal;
line-height: $font-16px;
Expand Down
2 changes: 0 additions & 2 deletions res/css/views/rooms/_EntityTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ limitations under the License.
padding-right: 12px;
padding-top: 4px;
padding-bottom: 4px;
width: 36px;
height: 36px;
position: relative;
}

Expand Down
9 changes: 5 additions & 4 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ limitations under the License.
}

.mx_EventTile.mx_EventTile_info .mx_EventTile_avatar {
top: 8px;
top: $font-8px;
left: 65px;
}

Expand Down Expand Up @@ -114,10 +114,9 @@ limitations under the License.
clear: both;
position: relative;
padding-left: 65px; /* left gutter */
padding-top: 4px;
padding-bottom: 2px;
padding-top: 3px;
padding-bottom: 3px;
border-radius: 4px;
min-height: 24px;
line-height: $font-22px;
}

Expand Down Expand Up @@ -311,6 +310,8 @@ div.mx_EventTile_notSent.mx_EventTile_redacted .mx_UnknownBody {
.mx_EventTile_readAvatars .mx_BaseAvatar {
position: absolute;
display: inline-block;
height: $font-14px;
width: $font-14px;
}

.mx_EventTile_readAvatarRemainder {
Expand Down
2 changes: 0 additions & 2 deletions res/css/views/rooms/_RoomHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@ limitations under the License.

.mx_RoomHeader_avatar {
flex: 0;
width: 28px;
height: 28px;
margin: 0 7px;
position: relative;
}
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/rooms/_RoomTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
flex-direction: row;
align-items: center;
cursor: pointer;
height: 34px;
height: $font-34px;
margin: 0;
padding: 0 8px 0 10px;
position: relative;
Expand Down
8 changes: 4 additions & 4 deletions res/css/views/settings/_AvatarSetting.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ limitations under the License.
*/

.mx_AvatarSetting_avatar {
width: 88px;
height: 88px;
width: $font-88px;
height: $font-88px;
margin-left: 13px;
position: relative;

& > * {
width: 88px;
width: $font-88px;
box-sizing: border-box;
}

Expand Down Expand Up @@ -63,7 +63,7 @@ limitations under the License.
& > img,
.mx_AvatarSetting_avatarPlaceholder {
display: block;
height: 88px;
height: $font-88px;
border-radius: 4px;
}

Expand Down
2 changes: 1 addition & 1 deletion res/css/views/settings/tabs/_SettingsTab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ limitations under the License.
display: inline-block;
font-size: $font-14px;
color: $primary-fg-color;
max-width: calc(100% - 48px); // Force word wrap instead of colliding with the switch
max-width: calc(100% - $font-48px); // Force word wrap instead of colliding with the switch
box-sizing: border-box;
padding-right: 10px;
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/structures/RoomSubList.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import RoomTile from "../views/rooms/RoomTile";
import LazyRenderList from "../views/elements/LazyRenderList";
import {_t} from "../../languageHandler";
import {RovingTabIndexWrapper} from "../../accessibility/RovingTabIndex";
import toRem from "../../utils/rem";

// turn this on for drop & drag console debugging galore
const debug = false;
Expand Down Expand Up @@ -383,7 +384,7 @@ export default class RoomSubList extends React.PureComponent {

setHeight = (height) => {
if (this._subList.current) {
this._subList.current.style.height = `${height}px`;
this._subList.current.style.height = toRem(height);
}
this._updateLazyRenderHeight(height);
};
Expand Down
Loading