瀏覽代碼

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,6 +1,6 @@
1 1
 #sideToolbarContainer {
2 2
     background-color: $newToolbarBackgroundColor;
3
-    display: flex;
3
+
4 4
     /**
5 5
      * Make the sidebar flush with the top of the toolbar. Take the size of
6 6
      * the toolbar and subtract from 100%.
@@ -43,7 +43,7 @@
43 43
     font-size: 10pt;
44 44
     line-height: 20px;
45 45
     overflow: auto;
46
-    padding: 5px;
46
+    padding: 16px;
47 47
     text-align: left;
48 48
     width: $sidebarWidth;
49 49
     word-wrap: break-word;
@@ -189,9 +189,6 @@
189 189
 
190 190
 .chatmessage {
191 191
     background-color: rgba(240, 243, 247, 0.15);
192
-    width: 93%;
193
-    margin-left: 9px;
194
-    margin-right: auto;
195 192
     border-radius: 0px 6px 6px 6px;
196 193
     margin-top: 3px;
197 194
     color: white;
@@ -248,14 +245,22 @@
248 245
 .smileys-panel {
249 246
     bottom: 100%;
250 247
     box-sizing: border-box;
251
-    height: 0;
248
+    height: auto;
249
+    max-height: 0;
252 250
     overflow: hidden;
253 251
     position: absolute;
254
-    transition: height 0.3s;
255 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 262
     &.show-smileys {
258
-        height: 146px;
263
+        max-height: 500%;
259 264
     }
260 265
 
261 266
     #smileysContainer {

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

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

Loading…
取消
儲存