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

Commit

Permalink
Organize style rules of ThreadPanel header (#8672)
Browse files Browse the repository at this point in the history
* Move declarations for ThreadPanel_dropdown to '.ThreadPanel__header'

Signed-off-by: Suguru Hirahara <[email protected]>

* Move declarations under '.mx_ThreadPanel_dropdown'

Signed-off-by: Suguru Hirahara <[email protected]>

* Move '~ .mx_ThreadPanel__header'

Signed-off-by: Suguru Hirahara <[email protected]>

* Move '.mx_ThreadPanel__header' under '.mx_BaseCard_header'

Signed-off-by: Suguru Hirahara <[email protected]>

* Use spacing variables for dropdown

Signed-off-by: Suguru Hirahara <[email protected]>

* yarn run link:style --fix

Signed-off-by: Suguru Hirahara <[email protected]>
  • Loading branch information
luixxiul authored Jun 8, 2022
1 parent abd39c6 commit 46f07a8
Showing 1 changed file with 57 additions and 57 deletions.
114 changes: 57 additions & 57 deletions res/css/views/right_panel/_ThreadPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,53 +33,76 @@ limitations under the License.

.mx_BaseCard_back {
margin-inline-start: calc(var(--BaseCard_header_button-margin) - 4px);

~ .mx_ThreadPanel__header {
width: calc(100% - 60px);
margin-inline-start: var(--ThreadPanel_header-button-size);

span {
margin-inline-start: 6px;
}
}
}

.mx_BaseCard_close {
margin-inline-end: calc(var(--BaseCard_header_button-margin) - 4px);
}
}

.mx_BaseCard_back ~ .mx_ThreadPanel__header {
width: calc(100% - 60px);
margin-inline-start: var(--ThreadPanel_header-button-size);
.mx_ThreadPanel__header {
width: calc(100% - 38px);
height: 24px;
display: flex;
flex: 1;
justify-content: space-between;
align-items: center;

span:first-of-type {
font-weight: 600;
font-size: 15px;
line-height: 18px;
color: $secondary-content;
}

span {
margin-inline-start: 6px;
}
}
.mx_AccessibleButton {
font-size: 12px;
color: $secondary-content;
}

.mx_ThreadPanel__header {
width: calc(100% - 38px);
height: 24px;
display: flex;
flex: 1;
justify-content: space-between;
align-items: center;
.mx_MessageActionBar_optionsButton {
position: relative;
}

span:first-of-type {
font-weight: 600;
font-size: 15px;
line-height: 18px;
color: $secondary-content;
}
.mx_MessageActionBar_maskButton {
width: var(--ThreadPanel_header-button-size);
height: var(--ThreadPanel_header-button-size);

.mx_AccessibleButton {
font-size: 12px;
color: $secondary-content;
}
&::after {
mask-size: var(--ThreadPanel_header-button-size);
mask-image: url("$(res)/img/element-icons/message/overflow-large.svg");
}
}

.mx_MessageActionBar_optionsButton {
position: relative;
}
.mx_ThreadPanel_dropdown {
padding: 3px $spacing-4 3px $spacing-8; // TODO: Use a spacing variable
border-radius: 4px;
line-height: 1.5;
user-select: none;

.mx_MessageActionBar_maskButton {
width: var(--ThreadPanel_header-button-size);
height: var(--ThreadPanel_header-button-size);
&:hover,
&[aria-expanded=true] {
background: $quinary-content;
}

&::after {
mask-size: var(--ThreadPanel_header-button-size);
mask-image: url("$(res)/img/element-icons/message/overflow-large.svg");
&::before {
content: "";
width: 18px;
height: 18px;
background: currentColor;
mask-image: url("$(res)/img/feather-customised/chevron-down.svg");
mask-size: 100%;
mask-repeat: no-repeat;
float: right;
}
}
}
}
Expand Down Expand Up @@ -179,29 +202,6 @@ limitations under the License.
box-sizing: border-box;
}

.mx_ThreadPanel_dropdown {
padding: 3px 4px 3px 8px;
border-radius: 4px;
line-height: 1.5;
user-select: none;
}

.mx_ThreadPanel_dropdown:hover,
.mx_ThreadPanel_dropdown[aria-expanded=true] {
background: $quinary-content;
}

.mx_ThreadPanel_dropdown::before {
content: "";
width: 18px;
height: 18px;
background: currentColor;
mask-image: url("$(res)/img/feather-customised/chevron-down.svg");
mask-size: 100%;
mask-repeat: no-repeat;
float: right;
}

.mx_MessageTimestamp {
font-size: $font-12px;
color: $secondary-content;
Expand Down

0 comments on commit 46f07a8

Please sign in to comment.