Skip to content

Instantly share code, notes, and snippets.

@kissarat
Created June 14, 2016 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kissarat/095e8e357a1cc7015f565e6dba8295c7 to your computer and use it in GitHub Desktop.
Save kissarat/095e8e357a1cc7015f565e6dba8295c7 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {
flex-direction: column;
margin: 0;
min-height: 100vh;
display: flex;
font-family: "Droid Sans", Ubuntu, "Segoe UI", serif;
justify-content: flex-end;
align-items: center;
background-color: white;
overflow-y: scroll;
}
.message {
padding: 8px 16px;
border-radius: 4px;
position: relative;
min-width: 20em;
max-width: 30em;
text-align: justify;
margin: 8px 0;
}
.message:after {
top: 1em;
position: absolute;
content: '';
display: inline-block;
width: 0;
height: 0;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
}
.message.right {
margin-right: 8px;
background-color: #0083FF;
align-self: flex-end;
color: white;
}
.message.right:after {
right: -8px;
border-left: 8px solid #0083FF;
}
.message.left {
margin-left: 8px;
background-color: #F2F0F1;
align-self: flex-start;
}
.message.left:after {
left: -8px;
border-right: 8px solid #F2F0F1;
}
.time {
color: darkgrey;
}
.missed-call {
color: red
}
</style>
</head>
<body>
<div class="message right">
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written
in a markup language. Although most often used to set the visual style of web pages and user interfaces written
in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is
applicable to rendering in speech, or on other media.
</div>
<div class="time">June 14th 2016, 12:48:00 am</div>
<div class="message left">
Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging
webpages, user interfaces for web applications, and user interfaces for many mobile applications.
</div>
<div class="message left">
CSS is designed primarily to enable the separation of document content from document presentation, including
aspects such as the layout, colors, and fonts.
</div>
<div class="message right">
This separation can improve content accessibility, provide more flexibility and control in the specification
of presentation characteristics, enable multiple HTML pages to share formatting by specifying the relevant CSS
in a separate .css file, and reduce complexity and repetition in the structural content.
</div>
<div class="missed-call">Missed call</div>
<div class="message left">
This separation of formatting and content makes it possible
</div>
<div class="message left">
o present the same markup page in different styles for different rendering methods, such as on-screen, in print,
by voice (when read out by a speech-based browser or screen reader) and on Braille-based, tactile devices.
</div>
<div class="message right">
It can also be used to display the web page differently depending on the screen size or device on which it is
being viewed. Readers can also specify a different style sheet, such as a CSS file stored on their own computer,
to override the one the author has specified.
</div>
<div class="message left">
Changes to the graphic design of a document (or hundreds of documents) can be applied quickly and easily,
by editing a few lines in the CSS file they use, rather than by changing markup in the documents.
</div>
<div class="message right">
The CSS specification describes a priority scheme to determine which style rules apply if more than one rule matches
against a particular element. In this so-called cascade, priorities (or weights) are calculated and assigned to
rules, so that the results are predictable.
</div>
<div class="message right">
The CSS specifications are maintained by the World Wide Web Consortium (W3C). Internet media type (MIME type)
text/css is registered for use with CSS by RFC 2318 (March 1998). The W3C operates a free CSS validation service
for CSS documents
</div>
<div class="message left">
CSS has a simple syntax and uses a number of English keywords to specify the names of various style properties.
</div>
<div class="message right">
A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors, and
a declaration block.
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
setTimeout(function () {
document.querySelector('.message:last-of-type').scrollIntoView(false);
}, 0);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment