Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Stop using mx_GroupLayout for styling #8711

Merged
merged 21 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1788a7b
Stop using mx_GroupLayout as the top level declaration for styling
luixxiul May 28, 2022
c7d2987
Move a variable inside a block on _GroupLayout.scss
luixxiul May 28, 2022
802f1d3
Move 'mx_EventTile[data-layout=group]' block from _GroupLayout.scss t…
luixxiul May 28, 2022
e59031b
Changes related to variables
luixxiul May 28, 2022
d37d9c2
Make cascading work for inline start margin of DisambiguatedProfile
luixxiul May 28, 2022
d13b67e
Merge the line-height declarations
luixxiul May 28, 2022
130727c
Remove a variable as it is used only once
luixxiul May 28, 2022
b0547f1
Extract declarations of .mx_MessageActionBar from mx_GroupLayout
luixxiul May 28, 2022
7e6f645
Move mx_GroupLayout block from _ThreadPanel.scss to _EventTile.scss
luixxiul May 28, 2022
ba52aab
Merge declarations in 'mx_EventTile[data-shape=ThreadsList]'
luixxiul May 28, 2022
5bf689d
Merge branch 'develop' into GroupLayout
luixxiul Jun 3, 2022
fbb379f
yarn rethemendex
luixxiul Jun 3, 2022
a5bc288
Set zero to inline end margin (right margin) on IRC layout
luixxiul Jun 3, 2022
b98799b
Merge branch 'develop' into GroupLayout
luixxiul Jun 3, 2022
210eed6
Merge branch 'develop' into GroupLayout
luixxiul Jun 5, 2022
3153d67
Merge branch 'develop' into GroupLayout
luixxiul Jun 7, 2022
e5873b7
Merge branch 'develop' of https://github.com/matrix-org/matrix-react-…
luixxiul Jun 10, 2022
cf50dd1
Use a shortcut
luixxiul Jun 10, 2022
a30564c
Merge branch 'develop' into GroupLayout
luixxiul Jun 15, 2022
bbd5127
Merge branch 'develop' into GroupLayout
luixxiul Jun 15, 2022
3a6fbc8
Merge branch 'develop' into GroupLayout
luixxiul Jun 15, 2022
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
28 changes: 5 additions & 23 deletions res/css/views/right_panel/_ThreadPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,29 +116,11 @@ limitations under the License.
height: 100%;
}

// Override _GroupLayout.scss for the thread panel
.mx_GroupLayout {
.mx_EventTile {
.mx_MessageActionBar {
right: 0;
top: -36px; // 2px above EventTile
z-index: 10; // See _EventTile.scss
}

&[data-shape=ThreadsList] {
> .mx_DisambiguatedProfile {
margin-inline-start: 0;
}

.mx_MessageTimestamp {
position: initial;
width: auto;
}

.mx_EventTile_line {
padding-bottom: 0; // Override mx_EventTile_line on _GroupLayout.scss
}
}
.mx_EventTile[data-layout=group] {
.mx_MessageActionBar {
right: 0;
top: -36px; // 2px above EventTile
z-index: 10; // See _EventTile.scss
}
}

Expand Down
26 changes: 22 additions & 4 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,25 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
}

&[data-layout=group] {
.mx_EventTile_line {
line-height: var(--GroupLayout-EventTile-line-height);
> .mx_DisambiguatedProfile {
line-height: $font-20px;
margin-left: $left-gutter;
}

> .mx_EventTile_avatar {
position: absolute;
z-index: 9;
}

.mx_MessageTimestamp {
position: absolute; // for modern layout
}

.mx_EventTile_line,
.mx_EventTile_reply {
padding-top: 1px;
padding-bottom: 3px;
line-height: $font-22px;
}
}
}
Expand Down Expand Up @@ -128,7 +145,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
display: inline-block;
padding-bottom: 0px;
padding-top: 0px;
margin: 0px;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max-width: calc(100% - $left-gutter);
}

Expand Down Expand Up @@ -789,7 +805,7 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
}

.mx_DisambiguatedProfile {
margin-right: $spacing-12;
margin-inline: 0 $spacing-12;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

display: inline-flex;
flex: 1;

Expand All @@ -813,6 +829,7 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
.mx_EventTile_line {
width: 100%;
box-sizing: border-box;
padding-bottom: 0;

.mx_ThreadPanel_replies {
margin-top: $spacing-8;
Expand All @@ -835,6 +852,7 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
.mx_MessageTimestamp {
max-width: 80px;
width: auto;
position: initial;
}
}

Expand Down
32 changes: 0 additions & 32 deletions res/css/views/rooms/_GroupLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

$left-gutter: 64px;

.mx_GroupLayout {
--GroupLayout-EventTile-line-height: $font-22px;

.mx_EventTile {
> .mx_DisambiguatedProfile {
line-height: $font-20px;
margin-left: $left-gutter;
}

> .mx_EventTile_avatar {
position: absolute;
z-index: 9;
}

.mx_MessageTimestamp {
position: absolute; // for modern layout
}

.mx_EventTile_line,
.mx_EventTile_reply {
padding-top: 1px;
padding-bottom: 3px;
}

.mx_EventTile_reply {
line-height: var(--GroupLayout-EventTile-line-height);
}
}
}

/* Compact layout overrides */

.mx_MatrixChat_useCompactLayout {
Expand Down
1 change: 1 addition & 0 deletions res/css/views/rooms/_IRCLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ $irc-line-height: $font-18px;

.mx_DisambiguatedProfile {
width: var(--name-width);
margin-inline-end: 0; // override mx_EventTile > *
display: flex;
order: 2;
flex-shrink: 0;
Expand Down