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

Stop using :not() pseudo class for mx_GenericEventListSummary #8944

Merged
merged 16 commits into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
ee606c7
Stop using :not() pseudo class for mx_GenericEventListSummary
luixxiul Jun 28, 2022
d27035f
Use a CSS variable for mx_GenericEventListSummary on _EventTile.scss …
luixxiul Jun 28, 2022
bd24388
Use a CSS variable for mx_GenericEventListSummary on _EventTile.scss …
luixxiul Jun 28, 2022
460d8ee
Move declarations for EventTile_line of GenericEventListSummary for I…
luixxiul Jun 28, 2022
0488931
Move mx_EventTile_line out of mx_GenericEventListSummary:not([data-la…
luixxiul Jun 28, 2022
9090e07
Move common style rules up
luixxiul Jun 28, 2022
dbfd42e
Set zero inline start padding to mx_EventTile_line of info tile of mx…
luixxiul Jun 28, 2022
b6418fc
Apply the rule to group/modern layout only
luixxiul Jun 28, 2022
d46a6ba
Apply the inline start padding to modern/group layout only
luixxiul Jun 29, 2022
135c097
Merge the style block for mx_EventTile_info .mx_EventTile_line
luixxiul Jun 29, 2022
2a9c542
Remove padding from info event tile line from mx_GenericEventListSumm…
luixxiul Jun 30, 2022
a330f12
Add spacing between avatar and a single info event tile line on IRC l…
luixxiul Jun 30, 2022
9c035cd
Stop using :not() pseudo class for mx_GenericEventListSummary on Time…
luixxiul Jun 30, 2022
eb772b7
Merge branch 'develop' of https://github.com/matrix-org/matrix-react-…
luixxiul Jul 3, 2022
ef3f805
Fix padding of line with redacted body text
luixxiul Jul 4, 2022
6f55c6e
Merge branch 'develop' of https://github.com/matrix-org/matrix-react-…
luixxiul Jul 5, 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
13 changes: 8 additions & 5 deletions res/css/views/right_panel/_TimelineCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,14 @@ limitations under the License.
}
}

.mx_GenericEventListSummary:not([data-layout=bubble]) {
.mx_EventTile_line,
> .mx_GenericEventListSummary_unstyledList > .mx_EventTile_info .mx_EventTile_avatar ~ .mx_EventTile_line {
padding-inline-start: var(--BaseCard_EventTile-spacing-inline);
padding-inline-end: var(--BaseCard_EventTile-spacing-inline);
.mx_GenericEventListSummary {
&[data-layout=irc],
&[data-layout=group] {
.mx_EventTile_line,
.mx_GenericEventListSummary_unstyledList > .mx_EventTile_info .mx_EventTile_avatar ~ .mx_EventTile_line {
padding-inline-start: var(--BaseCard_EventTile-spacing-inline);
padding-inline-end: var(--BaseCard_EventTile-spacing-inline);
}
}
}

Expand Down
45 changes: 37 additions & 8 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ $left-gutter: 64px;
&.mx_EventTile_continuation {
padding-top: 0px !important;
}

&.mx_EventTile_info .mx_EventTile_line {
padding-left: calc($left-gutter + 20px); // override padding-left $left-gutter
}
}

&[data-layout=bubble] {
Expand Down Expand Up @@ -349,17 +353,42 @@ $left-gutter: 64px;
}
}

.mx_GenericEventListSummary:not([data-layout=bubble]) .mx_EventTile_line {
padding-left: $left-gutter;
.mx_GenericEventListSummary {
&[data-layout=irc],
&[data-layout=group] {
.mx_EventTile_line .mx_RedactedBody {
line-height: 1; // remove spacing between lines
}
}

.mx_RedactedBody {
line-height: 1; // remove spacing between lines
&[data-layout=irc] {
.mx_EventTile_info .mx_EventTile_line {
padding-left: 0; // Override .mx_EventTile:not([data-layout="bubble"]).mx_EventTile_info .mx_EventTile_line
}

.mx_EventTile_line .mx_RedactedBody {
padding-left: 24px; // 25px - 1px

&::before {
left: var(--right-padding);
}
}

// Apply only collapsed events block
> .mx_EventTile_line {
padding-left: calc(var(--name-width) + var(--icon-width) + $MessageTimestamp_width + 3 * var(--right-padding)); // 15 px of padding
}
}
}

.mx_EventTile:not([data-layout=bubble]).mx_EventTile_info .mx_EventTile_line,
.mx_GenericEventListSummary:not([data-layout=bubble]) > .mx_GenericEventListSummary_unstyledList > .mx_EventTile_info .mx_EventTile_avatar ~ .mx_EventTile_line {
padding-left: calc($left-gutter + 20px); // override padding-left $left-gutter
&[data-layout=group] {
.mx_EventTile_line {
padding-left: $left-gutter;
}

.mx_GenericEventListSummary_unstyledList > .mx_EventTile_info .mx_EventTile_avatar ~ .mx_EventTile_line {
padding-left: calc($left-gutter + 20px); // override padding-left $left-gutter
}
}
}

.mx_EventTile_content {
Expand Down
17 changes: 7 additions & 10 deletions res/css/views/rooms/_IRCLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

$icon-width: 14px;
$right-padding: 5px;
$irc-line-height: $font-18px;

.mx_IRCLayout {
--name-width: 70px;
--icon-width: 14px;
--right-padding: 5px;

line-height: $irc-line-height !important;

Expand All @@ -36,7 +36,7 @@ $irc-line-height: $font-18px;
padding-top: 0;

> * {
margin-right: $right-padding;
margin-right: var(--right-padding);
}

.mx_EventTile_msgOption {
Expand Down Expand Up @@ -157,26 +157,23 @@ $irc-line-height: $font-18px;

.mx_EventTile_emote {
.mx_EventTile_avatar {
margin-left: calc(var(--name-width) + $icon-width + $right-padding);
margin-left: calc(var(--name-width) + var(--icon-width) + var(--right-padding));
}
}

blockquote {
margin: 0;
}

.mx_GenericEventListSummary > .mx_EventTile_line {
padding-left: calc(var(--name-width) + $icon-width + $MessageTimestamp_width + 3 * $right-padding); // 15 px of padding
}

.mx_EventTile.mx_EventTile_info {
.mx_EventTile_avatar {
left: calc(var(--name-width) + 10px + $icon-width);
left: calc(var(--name-width) + 10px + var(--icon-width));
top: 0;
margin-right: var(--right-padding);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This creates gap between the avatar and the info line.

}

.mx_EventTile_line {
left: calc(var(--name-width) + 10px + $icon-width);
left: calc(var(--name-width) + 10px + var(--icon-width));
}

.mx_TextualEvent {
Expand Down