Created
February 14, 2018 03:22
-
-
Save togakangaroo/79bf39598a8bac16da99c57fa4edccec to your computer and use it in GitHub Desktop.
// source http://jsbin.com/lazagis
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
<style id="jsbin-css"> | |
section { | |
overflow: hidden; | |
background-color: teal; | |
height: calc(5 * 2.6ex); | |
line-height: 2.6ex; | |
} | |
section p { | |
float: right; | |
margin: 0; | |
margin-left: -1px; | |
width: 100%; | |
} | |
section:before { | |
content: ""; | |
float: left; | |
outline: 1px solid green; | |
width: 1px; | |
height: 100%; | |
} | |
section:after { | |
content: "…"; | |
background: rgba(255, 255, 255, 0.5); | |
float: right; | |
position: relative; | |
text-align: right; | |
left: 100%; | |
box-sizing: border-box; | |
top: -3ex; | |
width: 3.5ex; | |
margin-left: calc(1px - 3.5ex); | |
} | |
</style> | |
<section> | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero omnis magnam deleniti, velit, ratione distinctio. Ex unde adipisci molestiae id aspernatur dolor, totam nulla aperiam in! Animi nulla, id? Laudantium. | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero omnis magnam deleniti, velit, ratione distinctio. Ex unde adipisci molestiae id aspernatur dolor, totam nulla aperiam in! Animi nulla, id? Laudantium. | |
</p> | |
</section> | |
<script id="jsbin-source-css" type="text/css">section { | |
overflow: hidden; | |
background-color: teal; | |
height: ~"calc(5 * 2.6ex)"; | |
line-height: 2.6ex; | |
p { | |
float: right; | |
margin: 0; | |
margin-left: -1px; | |
width: 100%; | |
} | |
&:before { | |
content: ""; | |
float: left; | |
outline: 1px solid green; | |
width: 1px; | |
height: 100%; | |
} | |
&:after { | |
content: "…"; | |
//background: linear-gradient(to right, rgba(255, 255, 255, 0), white 10%, white); | |
background: rgba(255,255,255, .5); | |
float: right; | |
position: relative; | |
text-align: right; | |
left: 100%; | |
box-sizing: border-box; | |
top: -3.0ex; | |
width: 3.5ex; | |
margin-left: ~"calc(1px - 3.5ex)"; | |
} | |
} | |
</script> |
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
section { | |
overflow: hidden; | |
background-color: teal; | |
height: calc(5 * 2.6ex); | |
line-height: 2.6ex; | |
} | |
section p { | |
float: right; | |
margin: 0; | |
margin-left: -1px; | |
width: 100%; | |
} | |
section:before { | |
content: ""; | |
float: left; | |
outline: 1px solid green; | |
width: 1px; | |
height: 100%; | |
} | |
section:after { | |
content: "…"; | |
background: rgba(255, 255, 255, 0.5); | |
float: right; | |
position: relative; | |
text-align: right; | |
left: 100%; | |
box-sizing: border-box; | |
top: -3ex; | |
width: 3.5ex; | |
margin-left: calc(1px - 3.5ex); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment