This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 833
Tidy up IRCLayout.pcss #10189
Merged
Merged
Tidy up IRCLayout.pcss #10189
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
9e14ae9
Specify the data-layout=irc against ':not([data-layout=bubble])'
luixxiul c5ecf16
Include mx_EventTile_info in mx_EventTile[data-layout=irc]
luixxiul 3861c44
Move declarations up, removing a default declaration
luixxiul bb79f0e
Tidy up mx_EventTile:hover
luixxiul 4a30bcb
Use a spacing variable
luixxiul 3f91291
Sort by order properties
luixxiul ef9a28f
Move and add comments
luixxiul 82c839e
Merge style declarations - flex-shrink and height
luixxiul a5ccb64
Consider cascading order
luixxiul 7db02fe
Move order declaration top
luixxiul 181d111
Merge branch 'develop' into IRCLayout
luixxiul 1dd631d
Merge branch 'develop' into IRCLayout
luixxiul 82d751d
Merge branch 'develop' into IRCLayout
luixxiul 0a8865e
Merge branch 'develop' into IRCLayout
luixxiul 0453cdb
Merge branch 'develop' into IRCLayout
luixxiul db2b0e0
Merge branch 'develop' into IRCLayout
luixxiul 70ed0a9
Merge branch 'develop' into IRCLayout
luixxiul 786ec4a
Merge branch 'develop' into IRCLayout
luixxiul ebc87b6
Merge branch 'develop' into IRCLayout
luixxiul 68092ae
Merge branch 'develop' into IRCLayout
luixxiul 0d039fa
Fix an invalid comment
luixxiul c91e63e
Merge branch 'develop' into IRCLayout
luixxiul a7bfd51
Merge branch 'develop' of https://github.com/matrix-org/matrix-react-…
luixxiul e7f95af
Merge branch 'develop' into IRCLayout
luixxiul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,57 +17,54 @@ limitations under the License. | |
$irc-line-height: $font-18px; | ||
|
||
.mx_IRCLayout { | ||
--name-width: 80px; // cf. ircDisplayNameWidth on Settings.tsx | ||
--name-width: 80px; /* cf. ircDisplayNameWidth on Settings.tsx */ | ||
--icon-width: 14px; | ||
--right-padding: 5px; | ||
--line-height: $irc-line-height; | ||
--right-padding: 5px; /* TODO: Use a spacing variable */ | ||
|
||
line-height: var(--line-height) !important; | ||
|
||
blockquote { | ||
margin: 0; | ||
} | ||
|
||
.mx_NewRoomIntro { | ||
> h2 { | ||
line-height: initial; /* Cancel $irc-line-height */ | ||
} | ||
} | ||
|
||
.mx_EventTile { | ||
.mx_EventTile[data-layout="irc"] { | ||
--EventTile_irc_line-padding-block: 1px; | ||
|
||
/* timestamps are links which shouldn't be underlined */ | ||
> a { | ||
text-decoration: none; | ||
min-width: $MessageTimestamp_width; | ||
} | ||
|
||
display: flex; | ||
flex-direction: row; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since there is not an inherited value for the property, this declaration can safely be removed. |
||
align-items: flex-start; | ||
padding-top: 0; | ||
|
||
> a { | ||
text-decoration: none; /* timestamps are links which shouldn't be underlined */ | ||
min-width: $MessageTimestamp_width; /* ensure space for EventTile without timestamp */ | ||
} | ||
|
||
> * { | ||
margin-right: var(--right-padding); | ||
} | ||
|
||
.mx_EventTile_msgOption { | ||
order: 5; | ||
flex-shrink: 0; | ||
.mx_EventTile_avatar, | ||
.mx_EventTile_e2eIcon { | ||
height: $irc-line-height; | ||
} | ||
|
||
.mx_EventTile_line, | ||
.mx_EventTile_reply { | ||
display: flex; | ||
flex-direction: column; | ||
order: 3; | ||
flex-grow: 1; | ||
flex-shrink: 1; | ||
min-width: 0; | ||
.mx_EventTile_avatar, | ||
.mx_DisambiguatedProfile, | ||
.mx_EventTile_e2eIcon, | ||
.mx_EventTile_msgOption { | ||
flex-shrink: 0; | ||
} | ||
|
||
.mx_EventTile_avatar { | ||
order: 1; | ||
position: relative; | ||
flex-shrink: 0; | ||
height: $irc-line-height; | ||
display: flex; | ||
align-items: center; | ||
|
||
|
@@ -82,10 +79,9 @@ $irc-line-height: $font-18px; | |
} | ||
|
||
.mx_DisambiguatedProfile { | ||
order: 2; | ||
width: var(--name-width); | ||
margin-inline-end: 0; /* override mx_EventTile > * */ | ||
order: 2; | ||
flex-shrink: 0; | ||
|
||
> .mx_DisambiguatedProfile_displayName { | ||
width: 100%; | ||
|
@@ -96,9 +92,8 @@ $irc-line-height: $font-18px; | |
|
||
> .mx_DisambiguatedProfile_mxid { | ||
visibility: collapse; | ||
/* Override the inherited margin. */ | ||
margin-left: 0; | ||
padding: 0 5px; | ||
margin-left: 0; /* Override the inherited margin. */ | ||
padding: 0 5px; /* TODO: Use a spacing variable */ | ||
} | ||
|
||
&:hover { | ||
|
@@ -110,7 +105,7 @@ $irc-line-height: $font-18px; | |
display: inline; | ||
background-color: $event-selected-color; | ||
border-radius: 8px 0 0 8px; | ||
padding-right: 8px; | ||
padding-right: $spacing-8; | ||
} | ||
|
||
> .mx_DisambiguatedProfile_mxid { | ||
|
@@ -123,12 +118,7 @@ $irc-line-height: $font-18px; | |
|
||
.mx_EventTile_e2eIcon { | ||
padding: 0; | ||
|
||
flex-shrink: 0; | ||
flex-grow: 0; | ||
|
||
height: $font-18px; | ||
|
||
background-position: center; | ||
} | ||
|
||
|
@@ -155,13 +145,34 @@ $irc-line-height: $font-18px; | |
} | ||
} | ||
|
||
.mx_EventTile_line, | ||
.mx_EventTile_reply { | ||
order: 3; | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
flex-shrink: 1; | ||
min-width: 0; | ||
} | ||
|
||
.mx_EventTile_reply { | ||
order: 4; | ||
} | ||
|
||
.mx_EventTile_msgOption { | ||
order: 5; | ||
} | ||
|
||
.mx_EditMessageComposer_buttons { | ||
position: relative; | ||
} | ||
|
||
&.mx_EventTile_info { | ||
.mx_ViewSourceEvent, /* For hidden events */ | ||
.mx_TextualEvent { | ||
line-height: $irc-line-height; | ||
} | ||
} | ||
} | ||
|
||
.mx_EventTile_emote { | ||
|
@@ -171,17 +182,6 @@ $irc-line-height: $font-18px; | |
} | ||
} | ||
|
||
blockquote { | ||
margin: 0; | ||
} | ||
|
||
.mx_EventTile.mx_EventTile_info { | ||
.mx_ViewSourceEvent, /* For hidden events */ | ||
.mx_TextualEvent { | ||
line-height: $irc-line-height; | ||
} | ||
} | ||
|
||
.mx_ReplyChain { | ||
.mx_DisambiguatedProfile { | ||
width: unset; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Protection against unintentional override by something in
.mx_EventTile:not([data-layout="bubble"])
on_EventTile.pcss