浏览代码

ref(chat): make wider

master
Leonard Kim 6 年前
父节点
当前提交
ec2826e0fc
共有 2 个文件被更改,包括 14 次插入9 次删除
  1. 13
    8
      css/_chat.scss
  2. 1
    1
      css/_variables.scss

+ 13
- 8
css/_chat.scss 查看文件

1
 #sideToolbarContainer {
1
 #sideToolbarContainer {
2
     background-color: $newToolbarBackgroundColor;
2
     background-color: $newToolbarBackgroundColor;
3
-    display: flex;
3
+
4
     /**
4
     /**
5
      * Make the sidebar flush with the top of the toolbar. Take the size of
5
      * Make the sidebar flush with the top of the toolbar. Take the size of
6
      * the toolbar and subtract from 100%.
6
      * the toolbar and subtract from 100%.
43
     font-size: 10pt;
43
     font-size: 10pt;
44
     line-height: 20px;
44
     line-height: 20px;
45
     overflow: auto;
45
     overflow: auto;
46
-    padding: 5px;
46
+    padding: 16px;
47
     text-align: left;
47
     text-align: left;
48
     width: $sidebarWidth;
48
     width: $sidebarWidth;
49
     word-wrap: break-word;
49
     word-wrap: break-word;
189
 
189
 
190
 .chatmessage {
190
 .chatmessage {
191
     background-color: rgba(240, 243, 247, 0.15);
191
     background-color: rgba(240, 243, 247, 0.15);
192
-    width: 93%;
193
-    margin-left: 9px;
194
-    margin-right: auto;
195
     border-radius: 0px 6px 6px 6px;
192
     border-radius: 0px 6px 6px 6px;
196
     margin-top: 3px;
193
     margin-top: 3px;
197
     color: white;
194
     color: white;
248
 .smileys-panel {
245
 .smileys-panel {
249
     bottom: 100%;
246
     bottom: 100%;
250
     box-sizing: border-box;
247
     box-sizing: border-box;
251
-    height: 0;
248
+    height: auto;
249
+    max-height: 0;
252
     overflow: hidden;
250
     overflow: hidden;
253
     position: absolute;
251
     position: absolute;
254
-    transition: height 0.3s;
255
     width: $sidebarWidth;
252
     width: $sidebarWidth;
256
 
253
 
254
+    /**
255
+     * CSS transitions do not apply for auto dimensions. So to produce the css
256
+     * accordion effect for showing and hiding the smiley-panel, while allowing
257
+     * for variable panel, height, use a very large max-height and animate off
258
+     * of that.
259
+     */
260
+    transition: max-height 0.3s;
261
+
257
     &.show-smileys {
262
     &.show-smileys {
258
-        height: 146px;
263
+        max-height: 500%;
259
     }
264
     }
260
 
265
 
261
     #smileysContainer {
266
     #smileysContainer {

+ 1
- 1
css/_variables.scss 查看文件

87
  */
87
  */
88
 $borderRadius: 4px;
88
 $borderRadius: 4px;
89
 $defaultWatermarkLink: '../images/watermark.png';
89
 $defaultWatermarkLink: '../images/watermark.png';
90
-$sidebarWidth: 220px;
90
+$sidebarWidth: 375px;
91
 $popoverMenuPadding: 13px;
91
 $popoverMenuPadding: 13px;
92
 $happySoftwareBackground: transparent;
92
 $happySoftwareBackground: transparent;
93
 $desktopAppDragBarHeight: 25px;
93
 $desktopAppDragBarHeight: 25px;

正在加载...
取消
保存