Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Step 4.9: Add basic messages stylesheet
- Loading branch information
1 parent
05ce863
commit a009a6c
Showing
2 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,89 @@ | ||
.messages-page-navbar { | ||
.chat-picture { | ||
width: 50px; | ||
border-radius: 50%; | ||
float: left; | ||
} | ||
|
||
.chat-title { | ||
line-height: 50px; | ||
float: left; | ||
} | ||
} | ||
|
||
.messages-page-content { | ||
.messages { | ||
height: 100%; | ||
background-image: url(/assets/chat-background.jpg); | ||
background-color: #E0DAD6; | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
} | ||
|
||
.message-wrapper { | ||
margin-bottom: 9px; | ||
|
||
&::after { | ||
content: ""; | ||
display: table; | ||
clear: both; | ||
} | ||
} | ||
|
||
.message { | ||
display: inline-block; | ||
position: relative; | ||
max-width: 236px; | ||
border-radius: 7px; | ||
box-shadow: 0 1px 2px rgba(0, 0, 0, .15); | ||
|
||
&.message-mine { | ||
float: right; | ||
background-color: #DCF8C6; | ||
|
||
&::before { | ||
right: -11px; | ||
background-image: url(/assets/message-mine.png) | ||
} | ||
} | ||
|
||
&.message-other { | ||
float: left; | ||
background-color: #FFF; | ||
|
||
&::before { | ||
left: -11px; | ||
background-image: url(/assets/message-other.png) | ||
} | ||
} | ||
|
||
&.message-other::before, &.message-mine::before { | ||
content: ""; | ||
position: absolute; | ||
bottom: 3px; | ||
width: 12px; | ||
height: 19px; | ||
background-position: 50% 50%; | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
} | ||
|
||
.message-content { | ||
padding: 5px 7px; | ||
word-wrap: break-word; | ||
|
||
&::after { | ||
content: " \00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0"; | ||
display: inline; | ||
} | ||
} | ||
|
||
.message-timestamp { | ||
position: absolute; | ||
bottom: 2px; | ||
right: 7px; | ||
font-size: 12px; | ||
color: gray; | ||
} | ||
} | ||
} |
This file contains 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,5 @@ | ||
.messages-page-content { | ||
> .scroll-content { | ||
margin: 42px -15px 99px !important; | ||
} | ||
} |