Skip to content

Commit 6607bee

Browse files
authored
Merge pull request element-hq#1799 from ribot/feature-inline-link-preview
Presentation for inline link
2 parents 74c9ac0 + 35e3621 commit 6607bee

File tree

4 files changed

+51
-36
lines changed

4 files changed

+51
-36
lines changed

src/skins/vector/css/common.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ h2 {
4646
margin-bottom: 16px;
4747
}
4848

49+
a {
50+
text-decoration: none;
51+
}
52+
53+
a:hover {
54+
text-decoration: underline;
55+
}
56+
4957
a:hover,
5058
a:link,
5159
a:visited {

src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,12 @@ limitations under the License.
6464
margin-right: 95px;
6565
}
6666

67-
/* all the overflow-y: hidden; are to trap Zalgos -
68-
but they introduce an implicit overflow-x: auto.
69-
so make that explicitly hidden too to avoid random
70-
horizontal scrollbars occasionally appearing, like in
67+
/* Removed hidden overflow in order to have hanging elements
68+
in the message stream gutters. This may re-introduce
7169
https://github.com/vector-im/vector-web/issues/1154
72-
*/
70+
*/
7371
.mx_EventTile_content {
7472
display: block;
75-
overflow-y: hidden;
76-
overflow-x: hidden;
7773
}
7874

7975
/* Various markdown overrides */

src/skins/vector/css/matrix-react-sdk/views/rooms/LinkPreviewWidget.css

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,51 +15,47 @@ limitations under the License.
1515
*/
1616

1717
.mx_LinkPreviewWidget {
18+
position: relative;
1819
margin-top: 15px;
19-
margin-right: 15px;
20-
margin-bottom: 15px;
21-
display: -webkit-flex;
22-
display: flex;
23-
border-left: 4px solid #ddd;
24-
color: #888;
2520
}
2621

27-
.mx_LinkPreviewWidget_image {
28-
-webkit-flex: 0 0 100px;
29-
flex: 0 0 100px;
30-
margin-left: 15px;
31-
text-align: center;
32-
cursor: pointer;
22+
.mx_LinkPreviewWidget:before {
23+
position: absolute;
24+
z-index: 1;
25+
content: '\0020';
26+
top: 0;
27+
left: -15px;
28+
width: 1px;
29+
height: 100%;
30+
background-color: #dddddd;
31+
}
32+
33+
.mx_LinkPreviewWidget_indicator {
34+
position: absolute;
35+
z-index: 1;
36+
top: 2px;
37+
left: -40px;
3338
}
3439

3540
.mx_LinkPreviewWidget_caption {
36-
margin-left: 15px;
37-
-webkit-flex: 1 1 auto;
38-
flex: 1 1 auto;
41+
margin-bottom: 10px;
3942
}
4043

4144
.mx_LinkPreviewWidget_title {
42-
display: inline;
4345
font-weight: bold;
4446
}
4547

4648
.mx_LinkPreviewWidget_siteName {
47-
display: inline;
49+
opacity: 0.5;
50+
font-size: 13px;
51+
line-height: 18px;
4852
}
4953

50-
.mx_LinkPreviewWidget_description {
51-
margin-top: 8px;
52-
white-space: normal;
53-
word-break: break-word;
54+
.mx_LinkPreviewWidget_image {
55+
margin-top: 10px;
56+
margin-bottom: 10px;
5457
}
5558

56-
.mx_LinkPreviewWidget_cancel {
57-
visibility: hidden;
59+
.mx_LinkPreviewWidget_image img {
5860
cursor: pointer;
59-
-webkit-flex: 0 0 40px;
60-
flex: 0 0 40px;
61-
}
62-
63-
.mx_LinkPreviewWidget:hover .mx_LinkPreviewWidget_cancel {
64-
visibility: visible;
6561
}

src/skins/vector/img/icon-link.svg

Lines changed: 15 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)