This repository was archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 819
Improve pills #6398
Merged
SimonBrandner
merged 32 commits into
matrix-org:develop
from
SimonBrandner:feature/improved-pills
May 5, 2022
Merged
Improve pills #6398
Changes from 11 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
25d1c71
Convert Pill to TS
SimonBrandner be40bb9
Move pill CSS into a separate file
SimonBrandner 8a0d067
Cleanup _Pill.scss
SimonBrandner a69c11e
Unify pill colors
SimonBrandner 3748b76
Make space pills more squarish
SimonBrandner 3b29ed4
Add hover styling
SimonBrandner 8903966
Missing ()
SimonBrandner 2286054
Fix tooltip positioning weirdness
SimonBrandner 3debbb8
Remove unnecessary CSS
SimonBrandner 0c823db
Make space avatars in pill more squarish
SimonBrandner a6f26ae
Fix cursor behaviour
SimonBrandner b0ff201
Merge remote-tracking branch 'upstream/develop' into feature/improved…
SimonBrandner ba2d44a
rethemendex
SimonBrandner 76f87f1
Make member optional
SimonBrandner be8a5c7
Use an enum for pill type
SimonBrandner d520f1a
Use PillType in other files
SimonBrandner ef82db8
Disable naming conv
SimonBrandner 9bd20a7
Merge remote-tracking branch 'upstream/develop' into feature/improved…
SimonBrandner fa7116b
Merge remote-tracking branch 'upstream/develop' into feature/improved…
SimonBrandner 6a7bedf
Merge remote-tracking branch 'upstream/develop' into feature/improved…
SimonBrandner 7545ed5
Merge remote-tracking branch 'upstream/develop' into feature/improved…
SimonBrandner 05111dc
Revert space squareness
SimonBrandner 1787c78
Merge remote-tracking branch 'upstream/develop' into feature/improved…
SimonBrandner 7773cd6
Merge remote-tracking branch 'upstream/develop' into feature/improved…
SimonBrandner b865718
Fix missing import
SimonBrandner 64b0bb3
Merge remote-tracking branch 'upstream/develop' into feature/improved…
SimonBrandner eade4d2
Merge remote-tracking branch 'upstream/develop' into feature/improved…
SimonBrandner c7d55cb
Fix import
SimonBrandner 675f674
Merge remote-tracking branch 'upstream/develop' into feature/improved…
SimonBrandner 56b6f33
Merge remote-tracking branch 'upstream/develop' into feature/improved…
SimonBrandner 8a54c09
Merge branch 'develop' into feature/improved-pills
SimonBrandner 5e787ae
Merge branch 'develop' into feature/improved-pills
SimonBrandner 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 hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
Copyright 2021 Šimon Brandner <[email protected]> | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
.mx_Pill { | ||
padding: $font-1px 0.4em $font-1px 0; | ||
line-height: $font-17px; | ||
border-radius: $font-16px; | ||
vertical-align: text-top; | ||
display: inline-flex; | ||
align-items: center; | ||
|
||
cursor: pointer; | ||
|
||
color: $accent-fg-color !important; // To override .markdown-body | ||
background-color: $pill-bg-color !important; // To override .markdown-body | ||
|
||
&.mx_UserPill_me, | ||
&.mx_AtRoomPill { | ||
background-color: $warning-color !important; // To override .markdown-body | ||
} | ||
|
||
&:hover { | ||
background-color: $pill-hover-bg-color !important; // To override .markdown-body | ||
} | ||
|
||
&.mx_UserPill_me:hover { | ||
background-color: #ff6b75 !important; // To override .markdown-body | same on both themes | ||
} | ||
|
||
// We don't want to indicate clickability | ||
&.mx_AtRoomPill:hover { | ||
background-color: $warning-color !important; // To override .markdown-body | ||
cursor: unset; | ||
} | ||
|
||
&.mx_SpacePill { | ||
border-radius: $font-5px; | ||
|
||
.mx_BaseAvatar { | ||
border-radius: $font-5px; | ||
} | ||
} | ||
|
||
.mx_BaseAvatar { | ||
position: relative; | ||
display: inline-flex; | ||
align-items: center; | ||
border-radius: 10rem; | ||
margin-right: 0.24rem; | ||
} | ||
|
||
a& { | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
max-width: calc(100% - 1ch); | ||
text-decoration: none !important; // To override .markdown-body | ||
} | ||
} |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.