Skip to content

Commit

Permalink
Add _DisambiguatedProfile.pcss, applied to RightPanel as well
Browse files Browse the repository at this point in the history
Signed-off-by: Suguru Hirahara <[email protected]>
  • Loading branch information
luixxiul committed Mar 5, 2024
1 parent 8eb9404 commit c043a2e
Showing 4 changed files with 24 additions and 12 deletions.
5 changes: 3 additions & 2 deletions res/css/_sc/_customization.pcss
Original file line number Diff line number Diff line change
@@ -14,5 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

/* TODO: replace @import with @mixin once multiple CSS files are created for customization in order to keep styling modular */
@import "./views/rooms/_IRCLayout.pcss";
@import "./feature-improvement/consistency__TextEvent/index.pcss";

@mixin consistency__TextEvent;
14 changes: 10 additions & 4 deletions res/css/_sc/feature-improvement/consistency__TextEvent/index.pcss
Original file line number Diff line number Diff line change
@@ -19,10 +19,16 @@ limitations under the License.

@import "./views/rooms/_EventTile.pcss";
@import "./views/messages/_DecryptionFailureBody.pcss";
@import "./views/messages/_DisambiguatedProfile.pcss";

@define-mixin consistency__TextEvent {
@mixin EventTile_line_M;
@mixin EventTile_line_color;
@mixin EventTile_line_font;
@mixin DecryptionFailureBody;
/* Applied to IRC, modern layout, and the right panel */
/* Not applied to Bubble layout, which has its own class name with sc_ */
:where(.mx_RoomView_body[data-layout="irc"], .mx_RoomView_body[data-layout="group"], .mx_RightPanel) {
@mixin DisambiguatedProfile;
@mixin EventTile_line_M;
@mixin EventTile_line_color;
@mixin EventTile_line_font;
@mixin DecryptionFailureBody;
}
}
Original file line number Diff line number Diff line change
@@ -14,8 +14,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

@import "../../feature-improvement/consistency__TextEvent/index.pcss";

.mx_IRCLayout {
@mixin consistency__TextEvent; /* For now, this is applied to IRC layout only */
@define-mixin DisambiguatedProfile {
.mx_DisambiguatedProfile {
.mx_DisambiguatedProfile_mxid {
opacity: unset; /* Match mx_TextualEvent */
color: $tertiary-content;
}
}
}
Original file line number Diff line number Diff line change
@@ -17,7 +17,9 @@ limitations under the License.
/* Specify text color with color property instead of opacity.
Note this mixin is applied to GELS as well. */
@define-mixin EventTile_line_color {
:where(.mx_EventTile_info, .mx_GenericEventListSummary) {
/* Use :is to win against the specificity of
mx_EventTile_content.mx_ViewSourceEvent for example */
:is(.mx_EventTile_info, .mx_GenericEventListSummary) {
/* Get rid of opacity values for coloring from CSS files as it is very
confusing and makes it difficult to maintain consistency.
See: https://github.com/SchildiChat/schildichat-desktop/issues/241 */
@@ -44,7 +46,7 @@ limitations under the License.

/* Specify font for consistency */
@define-mixin EventTile_line_font {
:where(.mx_EventTile_info, .mx_GenericEventListSummary) {
:is(.mx_EventTile_info, .mx_GenericEventListSummary) {
--font: var(--cpd-font-body-sm-regular); /* Replace with js when needed */

.mx_EventTile_line {

0 comments on commit c043a2e

Please sign in to comment.