Last active
November 29, 2018 11:55
-
-
Save jerinisready/d324f80900daf0053e17cd4c57987de7 to your computer and use it in GitHub Desktop.
Css Snippet to have a Medium / Linkedin like, TextArea which is borderless, paddingless, title like, word break automatically to new line, overflow managed!
This file contains hidden or 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
| textarea { | |
| overflow-wrap: break-word; | |
| -webkit-appearance: textarea; | |
| border: none; | |
| -webkit-rtl-ordering: logical; | |
| -webkit-user-select: text; | |
| -webkit-box-orient: vertical; | |
| background: transparent none repeat scroll 0 0 !important; | |
| z-index: auto; | |
| resize: vertical; | |
| cursor: auto; | |
| padding: 0; | |
| white-space: pre-wrap; | |
| word-wrap: break-word; | |
| width: 100%; | |
| min-height: 1em; | |
| transition: none 0s cubic-bezier(.67,.19,.25,1) 0s; | |
| outline: 0; | |
| } | |
| textarea.title { | |
| font-size: 42px; | |
| font-weight: 600; | |
| } | |
| textarea.title::placeholder, | |
| textarea.title::-webkit-input-placeholder, | |
| textarea.title::-moz-placeholder, | |
| textarea.title::-ms-input-placeholder, | |
| textarea.title::-moz-placeholder{ | |
| font-size: 42px; | |
| font-weight: 600; | |
| } | |
| /** | |
| placeholder{ } | |
| -webkit-input-placeholder { } | |
| story__title > textarea::-moz-placeholder { } | |
| story__title > textarea:-ms-input-placeholder { } | |
| story__title > textarea:-moz-placeholder { } | |
| **/ | |
| /* Courtsy : | |
| 1) https://stackoverflow.com/a/14841923 | |
| 2) https://developer.mozilla.org/en-US/docs/Web/CSS/word-break | |
| */ | |
| /** | |
| Usage: | |
| <textarea class="title" placeholder=""> | |
| </textarea> | |
| **/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment